Jaehoon Lee (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=61d510f...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiN2VmNzRhNTNl...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16019?atlOrigin=eyJpIjoiN2VmNz...
) HHH-16019 (
https://hibernate.atlassian.net/browse/HHH-16019?atlOrigin=eyJpIjoiN2VmNz...
) @Where clause ignored after upgrading to Hibernate 6 (
https://hibernate.atlassian.net/browse/HHH-16019?atlOrigin=eyJpIjoiN2VmNz...
)
Change By: Jaehoon Lee (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=61d510f...
)
I am experiencing strange behavior in the process of upgrading to Hibernate 6.x. It seems
{{@Where}} annotation on entity class is ignored when using with entity graph or fetch
join. Despite the same entity classes and queries, wrong SQL is generated after upgrading
to Hibernate 6.x, which is not what I expected.
I have created a sample project to test the issue and show the situation in detail. Here
is GitHub repository for the sample project:
* Sample project (with Hibernate 5.6.14.Final): [ GitHub -
https://github.com/
dev-jaehoonlee/hibernate-orm-demo at /tree/
hibernate-5.6|https://github.com/dev-jaehoonlee/hibernate-orm-demo/tree/h...
|smart-link ]
* Sample project (with Hibernate 6.1.6.Final): [ GitHub -
https://github.com/
dev-jaehoonlee/hibernate-orm-demo at /tree/
hibernate-6.1|https://github.com/dev-jaehoonlee/hibernate-orm-demo/tree/h...
|smart-link ]
I have explained the details on discourse topic -
[
https://discourse.hibernate.org/t/where-clause-ignored-after-upgrading-to...]
I also forked hibernate-test-case-templates repository and added test cases:
[
https://github.com/dev-jaehoonlee/hibernate-test-case-templates/tree/HHH-...]
[
orm/hibernate-orm-5/src/test/java/org/hibernate/bugs/JPAUnitTestCase.java...]
and
[
orm/hibernate-orm-6/src/test/java/org/hibernate/bugs/JPAUnitTestCase.java...]
have the same test cases, but tests are passed with Hibernate 5.6 and failed with
Hibernate 6.1
(
https://hibernate.atlassian.net/browse/HHH-16019#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16019#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#100213- sha1:b01baad )