Usage of the @Where annotation on a collection that contains entities that make use of JOINED inheritance strategy results in incorrect SQL.
Hibernate is assuming that the column specified in the @Where annotation will always be on the table that belongs to the entity in the collection, instead of also checking the super-class tables.
For example, consider the following data model and mapping code:
Loading Application will issue incorrect SQL, where PROJ_VSN_EFF_TO_DTM is being referenced on the DFIP_APPLN_PROJ_VERSION table, rather than its super-class (DFIP_PROJECT_VERSION).
A unit test demonstrating the issue is attached.