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:
I have explained the details on discourse topic - https://discourse.hibernate.org/t/where-clause-ignored-after-upgrading-to-hibernate-6/7120 |