-->
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: hibernate bag, order-by
PostPosted: Sat May 20, 2006 6:49 pm 
Newbie

Joined: Sat Jan 14, 2006 8:03 pm
Posts: 18
Hello. I have a class called System which contains a collection of Modules. I use a bag, like this:

@hibernate.bag table="system_module" cascade="save-update" lazy="true" order-by="description"
@hibernate.collection-many-to-many class="Module" column="id_module"

I would like to order the collection by the description fileld of Module but the above line is giving an error:

Unknown column 'modules0_.description' in 'order clause'

I guess because there is no description field in system_module. How can I do this with xdoclet / hibernate mapping file?

Thanks in advance!

Bob


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 21, 2006 10:20 am 
Regular
Regular

Joined: Wed Apr 12, 2006 12:49 am
Posts: 105
Location: Malaysia
So, do you have a "description" field in your database table or not?


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.