Showing posts with label hibernate. Show all posts
Showing posts with label hibernate. Show all posts

Monday, August 19, 2013

Hibernate filtering behavior with cache.

As you may know there is a possibility in hibernate to handle objects visibility with filtering rules.
There are few issues worth remembering when filtering is combined with cache mechanism:

  • the filtering is not enabled by default (so if you want to use it for a session you need to enable filters)
  • the filtering bypasses second level cache. 
  • the filtering is not applied for Session.get or Session.load methods.