-->
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: Strange sorting same name column on many-to-one
PostPosted: Mon Mar 07, 2005 11:56 pm 
Newbie

Joined: Mon Mar 07, 2005 3:59 am
Posts: 1
Location: Cambodia
Hello all!
i have a strange sorting result after the execution of a query with association may-to-one.
The sorted column has the same name as one in the parent table.

My HQL query: SELECT l FROM Interloc l INNER JOIN l.societe as s order by s.nom

Result: return the list interloc which is always sorted by l.nom not l.societe.nom

Here is xml config file:


<class
name="com.vecteurplus.webapp.inforum6.model.Interloc"
table="INTERLOC"
lazy="true"

>
<id
name="noInterlo"
type="int"
column="NO_INTERLO">

<generator class="increment"/>
</id>
<property
name="nom"
type="java.lang.String"
column="NOM"
length="150"
/>

<!-- bi-directional many-to-one association to Societe -->
<many-to-one
name="societe"
class="com.vecteurplus.webapp.inforum6.model.Societe"/>
<column name="NO_SOCIETE" />
</many-to-one>


==================================

<class
name="com.vecteurplus.webapp.inforum6.model.Societe"
table="SOCIETE"
lazy="true"
>
<id
name="noSociete"
type="int"
column="NO_SOCIETE"
>
<generator class="assigned" />
</id>
<property
name="nom"
type="java.lang.String"
column="NOM"
length="100"
/>
</class>
</hibernate-mapping>



Can anyone help me?
Thanks in avance!
Oro


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.