-->
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: Sorting many-to-many collections - Repost
PostPosted: Tue Sep 27, 2005 2:32 pm 
Beginner
Beginner

Joined: Mon Sep 26, 2005 5:57 pm
Posts: 39
What is the syntax to to specify a sort on many-to-many collections.

I have a many-to-many collection like this:

<bag name="organizations" table="claim_user_orgs" lazy="true" >
<key column="claim_user_id" />
<many-to-many class="CID.IPath.NewBusinessLayer.organization, CID.IPath.NewBusinessLayer" column="organization_id" />
</bag>

where claim_user_orgs is an association table, and just has 2 columns: claim_user_id and organization_id. I want the collection "organizations" be returned sorted by a column in the organization table, and I would like the sort to happen in the database.


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.