-->
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.  [ 4 posts ] 
Author Message
 Post subject: Association with ORDER-BY on non-key field in Association Ta
PostPosted: Thu Sep 28, 2006 5:19 pm 
Beginner
Beginner

Joined: Tue Sep 13, 2005 4:54 pm
Posts: 34
Here is my problem:

1.) I have three tables. The middle one is an association table with extra attributes on the association. For that reason, I have a class [BirtReportCriteriaImpl.java] that holds the attributes contained on the middle association table.

2.) The setup is:

BIRT_REPORT_LIST 1:M BIRT_REPORT_LIST_CRITERIA M:1 BIRT_REPORT_CRITERIA

3.) The middle table has the extra attributes I'm mapping. The most important one for me is the CRITERIA_ORDER field, which should tell me the order to return the BirtReportCriteria (the assocation) objects ORDERED-BY the CRITERIA_ORDER

4.) My question is: How do I tell it to order by CRITERIA_ORDER (which only exists on the association table?)

Thank you,
Ty



Hibernate version:
3.1

Mapping documents:


Image


Image



Image


Java Classes To Support The Above


Image

BirtCriteriaImpl.java

Image

BirtReportCriteriaImpl.java

Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 28, 2006 11:37 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
The reportCriteriaList bag in BirtReportImpl can be ordered using either the order-by attribute (to order when doing the select) or the sort attribute (to sort in memory after fetching the rows from the BIRT_REPORT_LIST_CRITERIA table).

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
 Post subject: Thank you for the answer--I will work on it
PostPosted: Fri Sep 29, 2006 9:58 am 
Beginner
Beginner

Joined: Tue Sep 13, 2005 4:54 pm
Posts: 34
Tenwit,
Thank you kindly for the reply. Can you tell me how to award points? I don't see how to do that.

thank you,
Ty


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 01, 2006 4:40 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Click on the "yes" at the bottom of the post that helped.

_________________
Code tags are your friend. Know them and use them.


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