-->
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: Filter not applied when calling Load(T)
PostPosted: Mon Mar 31, 2008 3:17 pm 
Newbie

Joined: Tue Mar 06, 2007 5:28 pm
Posts: 6
Hi,

I have a mapping file with a filter defined for a class. When enabled, the filter is correctly applied when I call criteria.List<T>(), but not when I call session.Get<T>() or session.Load<T>.

It appears to be using the static sql for Get/Load.

Are filters only applied during List operations?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 2:32 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
It's not stated in the documentation, but my experiences told me that filter are only used in queries and criterias. Load/Get are for direct access to the persisted object by it's id, so I assume, there is no real point in filtering there.

_________________
--Wolfgang


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.