-->
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 write subquery in IN clause through criterian api
PostPosted: Fri Jan 08, 2010 6:03 am 
Newbie

Joined: Mon Jan 04, 2010 4:31 am
Posts: 2
HQL Query:
from Customer as customer where customer.username like '%"+customer+"%' and " +
" customer.statusMap="+StatusMapInterface.ACTIVE+" and " +
" customer.customerId in (select distinct cRole.customer from CustomerRole as cRole where cRole.role!="+RoleMap.SITEADMIN+")" +
" order by registeredDate asc

I need Criterian query. Please help me..
In the above Cusomer is the Parent class.
Cusomer_Rile is the child class.
customer_id in Customer class is having FK relation with Customer_Role table customer_id column.

Please let me know how to Query using create criterain api.
I already spent more than 10 hours for this.
Please help me ...

Thanks in Advance


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.