-->
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: correctly combining subquery and icriteria
PostPosted: Wed Jun 20, 2007 5:32 pm 
Newbie

Joined: Wed Feb 07, 2007 11:17 am
Posts: 5
I am having a little trouble forming the following query through Session.CreateCriteria. Here's the setup, I have a parent table and a child table with a 1 to many cardinality between the two tables. What I want is to form a ICriteria query that will retrieve the parent object along with a count of how many child object is associated with the parent object. So all the properties of the parent and a child count in one ICriteria query. Is this possible and how? I've been struggling with the docs and the code for a while, any help would be great. 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.