-->
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: Help on HQL query
PostPosted: Tue Sep 08, 2009 8:04 am 
Newbie

Joined: Sun Jun 17, 2007 7:04 am
Posts: 11
Hello,
maybe some Hibernate Pro can help me with a HQL query. I'm sorry if this is not the right forum.

I am developing a Forum software. In a Forum there can be many Messages (threads). A message can have multiple responses, which are also messages.

The basic structure for a Message is:

Message properties:
-> Forum (forum object it belongs to)
-> responseTo (is null if is first message in a Thread or points to the message it responds, conforming a thread)
Date
Subject
Body


I'd like to get a list of threads (messages with null responseTo value) but sorted by the Date field of the last response to its thread. (A very old message having a recent response in its thread chain would be the first in the resultList)

Thanks for any help on this,
Ignacio


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.