The scenario:
- Load a collection through filter F using session.enableFilter().
- Modify an object O of that collection so that F would now be false for that object.
The question:
Without closing the session or calling refresh, I now want subsequent accesses to the collection to not include O. What is the best practice method to achieve this? The problem is that I cannot just remove O from the collection because Hibernate will then issue a physical delete.
Logically, O has only been removed from the collection with respect to the current filter condition.
Thanks in advance for any advice,
Ben
|