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 order by a field in a one-to-many related entity
PostPosted: Mon Apr 23, 2007 8:48 pm 
Newbie

Joined: Mon Apr 23, 2007 8:11 pm
Posts: 2
Heres the basic setup:

(pseudocode)

<class Cat>

<set name="kittens" inverse="true" >
<one-to-many class="Kitten" />
</set>


Class Kitten has 2 relevant fields to this example- name and birthdate.

Now what I want to do, using criteria queries, is get a list of Cats, ordered by the name of the oldest kitten.

I have been googling for about 6 hours now, and I've read (but not fully grasped) the hibernate v3 docs, and I still don't even have a good place to start.

Can anyone help?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 24, 2007 5:37 pm 
Newbie

Joined: Mon Apr 23, 2007 8:11 pm
Posts: 2
No one has any idea?


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