-
Notifications
You must be signed in to change notification settings - Fork 173
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
QueryDSL predicates with @ManyToOne relationships do not work #7
Labels
Comments
Any news on this one? Tested the provided workaround but with no luck :( |
can i work on this? |
@ShivanshCharak yeah, sure 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, @manytoone relationships with
QDataTablesRepository
break global search:Server:
Client:
The
countQuery
issued byQueryDslJpaRepository.findAll(Predicate predicate, Pageable pageable)
triggers the following query:To add a proper
LEFT JOIN
, an (ugly) workaround would be to manually addJPQLQuery countQuery = createQuery(predicate).leftJoin(entity.get("address"))
. But if someone has a better idea, I'm open to suggestions!Update: since QueryDSL generates a leftJoin instead of an innerJoin when a sort is applied on the given column (ref), the following workaround works pretty well:
The text was updated successfully, but these errors were encountered: