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.  [ 2 posts ] 
Author Message
 Post subject: sort a list with a attribute of a many-to-one component
PostPosted: Thu Aug 19, 2004 12:06 pm 
Newbie

Joined: Wed Jul 21, 2004 3:58 am
Posts: 17
Hi guys !

Is it possible sort a list with a attribute of a many-to-one component ?

If I had a mapping like that, Is it possible to sort a list of sales with a criteria like the name of the offer ?

<hibernate-mapping>
<class name="Sale" table="Sale">
<id name="id" type="long" unsaved-value="null">
<column name="id" sql-type="bigint" not-null="true"/>
<generator class="identity"/>
</id>
<property name="name" unique="true">
<column name="AV_Nom" length="50" not-null="true"/>
</property>
<many-to-one name="offer" not-null="true" />
</class>
<class name="Offer" table="Offer">
<id name="id" type="long" unsaved-value="null">
<column name="id" sql-type="bigint" not-null="true"/>
<generator class="identity"/>
</id>
<property name="name">
<column name="Off_Name" length="32" not-null="true"/>
</property>
</class>
</hibernate-mapping>


Thank you in advance


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 20, 2004 7:06 pm 
Beginner
Beginner

Joined: Mon Aug 09, 2004 12:31 pm
Posts: 47
Location: New York, NY, USA
Could you sort the values in the getOffers method of Sale?

_________________
--DP


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