You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The countQuery issued by QueryDslJpaRepository.findAll(Predicate predicate, Pageable pageable) triggers the following query:
selectcount(user0_.id) as col_0_0_
from user_ user0_
cross join address address1_
whereuser0_.id_address=address1_.idand (lower(cast(user0_.idaschar)) like ? escape '\' or lower(cast(address1_.id as char)) like ? escape '\')
To add a proper LEFT JOIN, an (ugly) workaround would be to manually add JPQLQuery 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:
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: