Filter « Session « JPA Q&A





1. applying session filters    forum.hibernate.org

Hi, I'm using a spring, jpa & hibernate configuration. My base entity has a boolean column named "inactive" to mark items as deleted/inactive . But it seems I need to constantly activate the filter. I've put this logic of enabling the filter, based on user's role .equals ROLE_ADMIN, into my base service, so whenever a service extending base service cals super.getEntityManager(), ...

2. Problems with session.filter()    forum.hibernate.org

Hi, I am having trouble filtering a collection which has been returned by the session.find() method. The code which I am basically using looks like this: List result = session.find("...from ... where age > 50..."); List collection = (List) session.filter(result, "where this.name = 'testName'"); When I am running the code it throws the exception: net.sf.hibernate.TransientObjectException: Collection was not yet persistent Any ...

3. maxresults on a session.filter    forum.hibernate.org

4. session-per-conversation without filter    forum.hibernate.org

6. How do I disable all enabled filters of a session?    forum.hibernate.org

Hello, I need to disable all enabled filter of a given session, is it possible? Something like session.disableAllFilters() The problem is that in my integrations test the same session is shared between the method calls, and in production mode there's a interceptor that controls when to open and close sessions. So, in my service class before start enabling the filters I ...