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
When sorting on nested manyToOne, if the first-level is optional=true and the nested ones are optional=false (and vice versa), we expect a left join on nested levels, but cross joins with where clauses are generated (behaving like inner join, so absent lines are not included in result).
The problem comes from the way that QueryUtils.toExpressionRecursively and QueryUtils.requiresOuterJoin try to guess if a left join is required. When an outer join occurs, nested levels should not become inner joins.
Patrice Blanchardie opened DATAJPA-1822 and commented
See DATAJPA-1762:
When sorting on nested manyToOne, if the first-level is optional=true and the nested ones are optional=false (and vice versa), we expect a left join on nested levels, but cross joins with where clauses are generated (behaving like inner join, so absent lines are not included in result).
The problem comes from the way that QueryUtils.toExpressionRecursively and QueryUtils.requiresOuterJoin try to guess if a left join is required. When an outer join occurs, nested levels should not become inner joins.
Reproducible example attached
Affects: 2.3.5 (Neumann SR5), 2.4.1 (2020.0.1)
Attachments:
Referenced from: pull request #436
The text was updated successfully, but these errors were encountered: