-->
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.  [ 3 posts ] 
Author Message
 Post subject: join, group by, sort by, help needed
PostPosted: Thu Aug 17, 2006 1:24 pm 
Newbie

Joined: Thu Aug 17, 2006 12:44 pm
Posts: 4
hi, I am new to hibernate and need some help
I have a table called customers (id(primary key), customer name, purchase date, and receipt number(foreign key))
and
another table called purchases (receipt number(primary key), details, amount)
the mapping is done correctly (many to one)
I want to find out the most recent purchases for each customer with the amount shown. So, basically, the result is a list of unique customers, sorted by purchase date, and grouped by customers name, with the purchase amout shown. Is this possible?
How do I do that?
Any help is welcome
Thanks a ton


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 17, 2006 4:25 pm 
Newbie

Joined: Wed Jun 14, 2006 9:58 am
Posts: 2
What do you have so far?

Have mapped this entities with POJO and with .hbm.xml files?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 17, 2006 9:34 pm 
Newbie

Joined: Thu Aug 17, 2006 12:44 pm
Posts: 4
the mapping is done correctly and all the other easy hql runs just fine


agasea wrote:
What do you have so far?

Have mapped this entities with POJO and with .hbm.xml files?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.