-->
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: Combining two ICriteria
PostPosted: Tue Feb 21, 2006 2:30 am 
Newbie

Joined: Sat Oct 15, 2005 3:30 am
Posts: 17
Hi,

I would like to combine 2 different ICriteria objects (both created against the same entity type), but I do not know how.

an example:

ICriteria userCrit = session.CreateCriteria(typeof(Foo));
.. dev then adds expressions they need for their app purpose
userCrit.Add(Expression.Eq("bar", 1));

.. dev asks framework for data filtering criteria (outside of devs control, doesn't know what conditions the framework will add)

ICriteria filterCrit = Framework.ReturnDataFilter(x,y,z);

* now I want to 'join' them..

userCrit.Add(filterCrit); // How do I acheive this????

IList result = userCrit.List();


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 03, 2006 6:30 pm 
Beginner
Beginner

Joined: Thu Oct 27, 2005 11:53 am
Posts: 42
you cannot do this in hibernate


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.