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: How to return an object's collection as individual rows?
PostPosted: Fri Apr 04, 2008 10:54 am 
Newbie

Joined: Wed May 30, 2007 2:18 pm
Posts: 14
Hi all,

From the documentation there is the example of a Cat mapping with a collection of kittens.

How can I form a criteria query to return the kittens of a particular cat as individual items instead of getting the parent Cat? I thought you could do this but I cannot find anything in the documentation.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 04, 2008 11:46 am 
Newbie

Joined: Wed May 30, 2007 2:18 pm
Posts: 14
I've discovered that what I was looking for is "elements" which can be used in HQL. Is it still not supported in the criteria api?


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.