Jaehoon Lee (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=61d510f...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNWY3M2RlYmQy...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16019?atlOrigin=eyJpIjoiNWY3M2...
) HHH-16019 (
https://hibernate.atlassian.net/browse/HHH-16019?atlOrigin=eyJpIjoiNWY3M2...
) @Where not applied across association boundaries (
https://hibernate.atlassian.net/browse/HHH-16019?atlOrigin=eyJpIjoiNWY3M2...
)
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): [
https://github.com/dev Refer to the
repository below -
jaehoonlee/hibernate-orm-demo/tree/hibernate-5.6|https://github.com/dev-j...]
* - Sample project (with Hibernate 6.1.6.Final): [
https://github.com/dev Refer to the
repository below -
jaehoonlee/hibernate-orm-demo/tree/hibernate-6.1|https://github.com/dev-j...]
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-... -2/orm
|https://github.com/dev-jaehoonlee/hibernate-test-case-templates/tree/HHH-16019 -2/orm
|smart-link]
[
orm/hibernate-orm-5/src/test/java/org/hibernate/bugs/JPAUnitTestCase.java...
-2 /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...
-2 /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#100217- sha1:077879e )