-->
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 many to many
PostPosted: Mon Jan 29, 2007 10:44 pm 
Newbie

Joined: Wed Jan 19, 2005 11:20 pm
Posts: 2
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 2

Mapping documents:

Table A excerpt

<set
name="surficialGeologies"
lazy="true"
cascade="none"
order-by="layer_number asc"
table="SURFICIAL_GEOL_X_SITE_GEOL"
>
<key>
<column name="SITE_GEOLOGY_ID" />
</key>
<many-to-many class="nz.org.geonet.delta.domain.SurficialGeology">
<column name="SURFICIAL_GEOLOGY_ID" />
</many-to-many>
</set>



Full stack trace of any exception that occurs:
JDBC exception on Hibernate data access: could not initialize collection: [nz.org.geonet.delta.domain.SiteGeology.surficialGeologies#294]; nested exception is java.sql.SQLException: ORA-00904: "SURFICIALG0_"."LAYER_NUMBER": invalid identifier


Name and version of the database you are using: Oracle 9


I have a many to many relationship between table A and table B. A table with only foreign keys resolves the many to many relationship. The domain class mapped to table A contains a set of objects mapped to table B (SurficialGeology) . Is it possible to order the set by a property of table B (layer_number) rather than a property of the resolving table?




Read this: http://hibernate.org/42.html


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.