-->
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: how to apply "in" condition with two table alias properties.
PostPosted: Thu Nov 11, 2010 10:12 am 
Newbie

Joined: Thu Nov 11, 2010 9:22 am
Posts: 1
Expression.in(property, values) : supports for comparing property with collection of values provided.
we have the methods Expression.geProperty, leProperty & eqProperty...etc, supports the greater than, less than, equal to comparisions between two alias properties.
But i need to compare two alias properties with "in" operation like below given example.

example:
DetachedCriteria crit = DetachedCriteria.forClass(Prospects.class);
crit.createAlias("regDocs.documentType", "docType");
crit.createAlias("docType.docRequirement", "docReq");

"status" is a string property in Prospects.class.
"applicableStatusSet" is a "Set" Object property in docRequirement.class.

I need to check "Prospects.status" falls in the "docReq.applicableStatusSet".
How do we do this condition using hibernate Api.

Thanks in advance,
suresh.


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.