Comments (8)
I'm not sure what you mean by swapping parents? In main branch parents look fine to me
public interface ProjectRepository extends PagingAndSortingRepository<ProjectEntity, UUID> {
Page<ProjectEntity> findAllByOwner(UUID owner, Pageable pageable);
}
I suspect there's something wrong with findAllByOwner definition and spring data jdbc doesn't want to accept it.
Can you please update code in main and issue replication branch?
from infobip-spring-data-querydsl.
Ok, great, with my fix I now get on UserRepositoryTest (ProjectRepositoryTest passes).
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT "users"."ID" AS "ID", "users"."LASTNAME" AS "LASTNAME", "users"."FIRSTNAME" AS "FIRSTNAME" FROM "users" WHERE "users"."ID" = ?]; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "users.LASTNAME" not found; SQL statement:
SELECT "users"."ID" AS "ID", "users"."LASTNAME" AS "LASTNAME", "users"."FIRSTNAME" AS "FIRSTNAME" FROM "users" WHERE "users"."ID" = ? [42122-200]
I believe this exception is related #21 so I'll release a fix for this one.
from infobip-spring-data-querydsl.
working, thanks for fix.
from infobip-spring-data-querydsl.
I get
java.lang.ClassCastException: com.github.bilakpoc.springjdbcissues.data.entity.ProjectEntity cannot be cast to org.springframework.data.domain.Page
at com.github.bilakpoc.springjdbcissues.data.repository.ProjectRepositoryTest.testPaging(ProjectRepositoryTest.java:22)
on main branch which has no infobip dependency. Can you check that query method is compatible with spring-data-jdbc?
from infobip-spring-data-querydsl.
Ah that's probably my bad, I was creating multiple issues that time.
Please just swap the parents in both repositories and you should see the error. If you want I can change that also in repo, just let me know.
from infobip-spring-data-querydsl.
Sorry I'm not going to update the main branch because there is another issue so I don't want to produce another error.
I've just changed the feature/querydsl
branch where ProjectRepository extends PagingAndSortingRepository
and method returns List
instead of Page
so when you run ProjectRepositoryTest you will get this error:
Caused by: java.lang.IllegalArgumentException: Could not resolve query class for interface com.github.bilakpoc.springjdbcissues.data.repository.ProjectRepository
at com.infobip.spring.data.jdbc.QuerydslJdbcRepositoryFactory.getRelationalPathBaseFromQueryRepositoryClass(QuerydslJdbcRepositoryFactory.java:137)
at com.infobip.spring.data.jdbc.QuerydslJdbcRepositoryFactory.getRepositoryFragments(QuerydslJdbcRepositoryFactory.java:68)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepositoryComposition(RepositoryFactorySupport.java:371)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:276)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$5(RepositoryFactoryBeanSupport.java:323)
If you change the parent of ProjectRepository
from PagingAndSortingRepository
to QuerydslJdbcRepository
then it works, but I would suspect that application should work even with standard JDBC repositories.
Hope now it's more clear, sorry for misleading.
from infobip-spring-data-querydsl.
5.2.0 should be available on Cental in a few hours.
from infobip-spring-data-querydsl.
Can you confirm 5.2.0 fixes this?
from infobip-spring-data-querydsl.
Related Issues (20)
- Switch dependencies to io.github.openfeign.querydsl:* HOT 5
- 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.