-->
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.  [ 2 posts ] 
Author Message
 Post subject: Dynamic Filter Creation
PostPosted: Thu Jun 08, 2006 3:35 pm 
Newbie

Joined: Thu May 18, 2006 11:30 pm
Posts: 9
Ok, here is what I understand about Hibernate Filters.

1. You can define them (staticly) in mapping files, and attach them either at a class level or collection level.

2. You can create them (dynamically) by calling createFilter() on a session. However, this is only at a collection level.

By question then is, is there a way to dynamically create a filter on a session but at a class level?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 09, 2006 12:34 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Theoretically, it could be done. At configuration time, you could create a FilterDefinition object, then add it to Configuration.getFilterDefinitions. The problem with that is that it's not very dynamic, as it can only be done before the session factory is created.

_________________
Code tags are your friend. Know them and use them.


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

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.