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: order-by in many-to-many join table mapping
PostPosted: Wed Apr 25, 2007 2:41 pm 
Newbie

Joined: Tue Sep 21, 2004 1:33 pm
Posts: 5
I have the following hibernate mapping for an object called Foo

<set
name="barSet"
table="BAR_TABLE"
cascade="all"
order-by="TEXT asc"
lazy="false">
<key column="BAR_ID" />
<many-to-many
column="BAR_ID"
unique="true"
class="com.company.Bar" />
</set>

My question is how do I order the given set by a column in the bar_table?

The given mapping gives an error saying <alisa>.TEXT is an invalid identifier. I nows this works when doing is simple one-to-many when not using a join table, but is it possible while using a join table?


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.