| I have mixed feelings about the fix. The manual states, "Jut like with entities, collections can be filtered as well, but only if the filter is explicilty enabled on the currently running Hibernate Session" (Some typos in manual...) The collection elements in the initialized collection will depend on when the collection is initialized. I've created a PR to show this: https://github.com/hibernate/hibernate-orm/pull/1569 IMHO, if a filter is intended to operate on a collection, then that collection should be initialized in the session in which the filter is enabled. If an enabled filter should be used by a temporary session, maybe it would be better to create an API for this. I don't think this is a safe thing to do behind the scenes. |