Comments (9)
7.1.0 has been released. Let me know if it works.
Yes, it works. Thanks!
from infobip-spring-data-querydsl.
From what I can see in code - it should work.
How are you providing options to the annotation processor?
from infobip-spring-data-querydsl.
I was doing it in some different ways, two examples of maven snippets below:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<generatedSourcesDirectory>${project.build.directory}/generated-sources/annotations/</generatedSourcesDirectory>
<annotationProcessors>
<annotationProcessor>
com.infobip.spring.data.jdbc.annotation.processor.SpringDataJdbcAnnotationProcessor
</annotationProcessor>
</annotationProcessors>
<compilerArgs>
<arg>-Aquerydsl.generatedAnnotationClass=javax.annotation.Generated</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/target/generated-sources/annotations</outputDirectory>
<processor>com.infobip.spring.data.jdbc.annotation.processor.SpringDataJdbcAnnotationProcessor</processor>
<options>
<querydsl.generatedAnnotationClass>javax.annotation.Generated</querydsl.generatedAnnotationClass>
</options>
</configuration>
</execution>
</executions>
</plugin>
I am pretty sure these options are recognized by processor (in both cases) as while I run it under debugger, they are included in Options Map: processingEnv.getOptions() in CustomSpringDataJdbcConfiguration constructor.
From what I looked at the code I noticed that these options are passed to CodegenModule from DefaultConfiguration but are not added to SQLCodegenModule from SpringDataJdbcConfiguration.
from infobip-spring-data-querydsl.
Support can be added.
infobip-spring-data-querydsl uses both the regular CodegenModule and SQLCodegenModule.
SQLCodegenModule has no code anywhere in querydsl that binds CodegenModule.GENERATED_ANNOTATION_CLASS to anything so it relies on the default it inherits from CodegenModule and that one sets it to
bindInstance(GENERATED_ANNOTATION_CLASS, GeneratedAnnotationResolver.resolveDefault());
if configure
method is invoked.
I've added this to master - f73ac7f so let me know if this is it or you need something else.
from infobip-spring-data-querydsl.
Yes, this is exactly what I need.
from infobip-spring-data-querydsl.
BTW, I have one other question. I have a problem with setting up spring data jdbc with querydsl - I get runtime error:
org.springframework.data.repository.core.support.UnsupportedFragmentException: Repository com.atende.db.metadata.jdbcrepository.ActionRepository implements org.springframework.data.querydsl.QuerydslPredicateExecutor but JdbcRepositoryFactory does not support Querydsl!
I have described it in details on stackoverflow: https://stackoverflow.com/questions/72599490/spring-data-jdbc-querydsl-error-jdbcrepositoryfactory-does-not-support-query
Do you have any idea if I am missing anything or such use case is not supported yet in Spring data JDBC?
from infobip-spring-data-querydsl.
I've provided the full answer on stackoverflow - try removing the @EnableJdbcRepositories
first but it's likely something else is amiss. Check your classpath and check against the Spring setup that is used in jdbc module tests.
from infobip-spring-data-querydsl.
Yes, this is exactly what I need.
7.1.0 has been released. Let me know if it works.
from infobip-spring-data-querydsl.
I've provided the full answer on stackoverflow - try removing the
@EnableJdbcRepositories
first but it's likely something else is amiss. Check your classpath and check against the Spring setup that is used in jdbc module tests.
I did what you suggested but now have another problem - I have answered on stack overflow.
from infobip-spring-data-querydsl.
Related Issues (20)
- Parameter 0 of method setReactiveTransactionManager in com.infobip.spring.data.r2dbc.QuerydslR2dbcRepositoryFactoryBean required a bean of type 'org.springframework.transaction.ReactiveTransactionManager' that could not be found. HOT 2
- UseLiteral in SimpleQuerydslR2dbcFragment and ReactiveQuerydslR2dbcPredicateExecutor HOT 7
- R2dbc Querydsl use Projections but log not print relation table HOT 14
- org.springframework.data.relational.core.mapping '@Table' name property HOT 4
- Spring Boot 3 RC1 w/ R2DBC mapping error HOT 4
- Spring Boot 3 RC1 w/ R2DBC generation issue HOT 7
- How about support mongodb? HOT 1
- Class cannot be cast to class com.querydsl.sql.RelationalPathBase HOT 8
- `SimpleQuerydslR2dbcFragment` always uses `TransactionalRowsFetchSpec` HOT 2
- Custom JDBC table names naming strategy HOT 3
- [boot-starter] Cannot use custom JPA repositories HOT 2
- Test code doesn't run. Please confirm HOT 4
- Database Major Version Conditional Questions HOT 1
- Error generating Q classes HOT 1
- why send twice query? HOT 2
- two entity join but when projection is null? HOT 7
- when use PostgreSQL, QuerydslParameterBinder throws exception when replacing sql parameters HOT 2
- Projections.constructor cannot be nested when using r2dbc-querydsl associated queries HOT 10
- named binding is not supported HOT 5
- Native image with GraaalVM does not work. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from infobip-spring-data-querydsl.