Jaehoon Lee (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=61d510f...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNDExZDgzYTA3...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16019?atlOrigin=eyJpIjoiNDExZD...
) HHH-16019 (
https://hibernate.atlassian.net/browse/HHH-16019?atlOrigin=eyJpIjoiNDExZD...
) @Where clause ignored after upgrading to Hibernate 6 (
https://hibernate.atlassian.net/browse/HHH-16019?atlOrigin=eyJpIjoiNDExZD...
)
Issue Type: Bug Affects Versions: 6.1.6 Assignee: Unassigned Created: 10/Jan/2023 19:32 PM
Priority: Major Reporter: 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 - dev-jaehoonlee/hibernate-orm-demo
at hibernate-5.6 (
https://github.com/dev-jaehoonlee/hibernate-orm-demo/tree/hibernate-5.6
)
* Sample project (with Hibernate 6.1.6.Final): GitHub - dev-jaehoonlee/hibernate-orm-demo
at hibernate-6.1 (
https://github.com/dev-jaehoonlee/hibernate-orm-demo/tree/hibernate-6.1
)
I have explained the details on discourse topic -
https://discourse.hibernate.org/t/where-clause-ignored-after-upgrading-to...
(
https://discourse.hibernate.org/t/where-clause-ignored-after-upgrading-to...
)
(
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 )