-->
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: problem with hql in one to many association
PostPosted: Wed Jul 26, 2006 9:13 am 
Newbie

Joined: Sun Jul 09, 2006 3:21 am
Posts: 15
Imagine you have 2 entities that their relation is one-to-many. like cat and kitten(a cat has many kittens). now I want to load cats properties. If I use "select o.name form cat as o" I will receive an object[] of names. If I want to load kittens of cats I cant use "select o.kittens from cat as o" (imagine cat has an ArrayList property of kittens). I want to receive an object[][] of cats and thier related kittens. If I use the second query I receive "org.hibernate.QueryException: illegal syntax near collection...". what should I do to get one-to-many objects in object[][].


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.