Does azure-spring-cosmos-data support Specification or querydsl ? #25629
Labels
azure-spring-cosmos
Spring cosmos related issues.
Cosmos
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
We are using spring data cosmos library to fetch results from cosmosdb and have a requirement to build filter query dynamically. i.e User can filter on any property of a document. Spring provides this capability by using Specifications
https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#specifications
I tried to use this with CosmosRepository and getting error while starting application and getting bean creation issue
Repository definition
Logs
Error creating bean with name 'packageEntityRepository' defined in com.example.artifactmanagement.cosmosdb.entities.PackageEntityRepository defined in @EnableCosmosRepositories declared on CosmosDbConfiguration: Invocation of init method failed; nested exception is org.springframework.data.repository.query.QueryCreationException: Could not create query for public abstract org.springframework.data.domain.Page org.springframework.data.jpa.repository.JpaSpecificationExecutor.findAll(org.springframework.data.jpa.domain.Specification,org.springframework.data.domain.Pageable)! Reason: No property findAll found for type PackageEntity!; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property findAll found for type PackageEntity!\n\tat org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)\n\tat org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1354)\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1204)\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)\n\tat org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)\n\tat org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:338)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1332)
Does azure-spring-cosmos-data support Specification or querydsl ? If no, Do you have any plans to support it in near future.?
The text was updated successfully, but these errors were encountered: