Amr Mostafa (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNDc3NzQ5NDRh...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-14148?atlOrigin=eyJpIjoiNDc3Nz...
) HHH-14148 (
https://hibernate.atlassian.net/browse/HHH-14148?atlOrigin=eyJpIjoiNDc3Nz...
) Invalid SQL when null precedence, @OrderBy and entity graph are used (
https://hibernate.atlassian.net/browse/HHH-14148?atlOrigin=eyJpIjoiNDc3Nz...
)
Change By: Amr Mostafa (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Hibernate generates an invalid SQL for the case below, that basically resembles this:
{noformat}SELECT ... ORDER BY field nulls last nulls last{noformat}
(duplicate null precedence at the end)
The issue is constantly reproducible with a simple setup where you have 2 entities with a
{{@OneToMany}} relation with {{@OrderBy}} annotation on the collection. Then at query time
specify that relation in the entity graph hint.
I'm attaching the test scenario, it has 2 almost identical test cases:
1. With entity graph hint: Fails
2. Without entity graph hint: Succeeds
Please let me know if there is any other detail I could specify to help.
(
https://hibernate.atlassian.net/browse/HHH-14148#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-14148#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100142- sha1:98e8dd4 )