-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: applying session filters
PostPosted: Sun Sep 12, 2010 1:32 pm 
Newbie

Joined: Fri Oct 30, 2009 11:41 am
Posts: 6
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(), I enable the filter for that session. But isn't there a more elegant way of doing this ? I was thinking of using my own custom sessionfactory, but after a brief serch it seemed this wasn't feasible. Can you please help me on this?

Thanks,
João Domingues


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.