HHH-6781 Closed introduced functionality for including the where clause mapped using annotations (@Where(clause="....")) when loaded collections in 5.2. HHH-12875 Closed introduced the same functionality for hbm.xml mappings in 5.3.5. This change in behavior could cause problems for applications migrating from 5.1 or earlier to more recent versions. An option should be available for enabling/disabling this functionality.
An configuration property, hibernate.use_entity_where_clause_for_collections, will be added with the possible values:
- "true" - use an entity's mapped where-clause when loading collections of that entity (default for 5.3);
- "false" - ignore an entity's mapped where-clause when loading collections of that entity (default for 5.1);
This needs to be documented in the user guides and migratiopn notes.