-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query DSL with blaze-persistence is generating an extra joining #1902
Comments
Can you try This explicitly binds the join to the alias |
@jwgmeligmeyling, No luck! Still generating same query:
I changed to:
|
Hello @beikov ! Any suggestion, please? |
I added this in the root comment: And blaze-persistence configuration is:
|
No solution yet! |
The other join is added through an implicit join. I'm not sure where the implicit join is generated, but it appears to be from You can still try: .leftJoin(association). defaultJoin() To force a default join being rendered so that hopefully Blaze-Persistence pick the alias up in the subquery. If that doesn't fix it we'll need a reproducer (my guess would be that this is reproducible with just core and not the querydsl integration). |
Description
We used to use query DSL in our codes to build dynamic queries. As, some methods got deprecated since 5.0.0, from their documentation I have known about blaze-persistence.
So my current query-dsl code with blaze-persistence is:
And blaze-persistence configuration is:
Expected behavior
Earlier the code was like this:
And this generates SQL with same request this:
My expectation is after using blaze-persistence, the generated query should also be like this.
Actual behavior
And it generates a query like this with the code given in the description:
Conclusion
Blaze-persistence is doing an extra joining here. So I'm interested to know if I'm doing anything wrong here. Or is there any option to stop that extra joining? Can I create the query just like queryDsl's
JPAQueryFactory
used to do?Environment
Version: 1.6.11
JPA-Provider: Hibernate
DBMS: Maria DB
Application Server: Spring Boot 3.1.7
The text was updated successfully, but these errors were encountered: