-->
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: Forcing generated code to use lists instead of sets
PostPosted: Tue Sep 18, 2007 6:53 pm 
Newbie

Joined: Tue Sep 18, 2007 6:14 pm
Posts: 3
Hibernate version: 3.2.1

Hi I'm using the ANT "hibernatetool" task to reverse engineer JDK 5 compliant code with ejb 3 annotations from a JDBC connection to a SQLServer 2005 instance.

It's more of an annoyance really but currently hibernate is generating set collections for relationships and we would prefer to it to use a list collection instead.

I've had a look at http://www.hibernate.org/hib_docs/annot ... ntity.html section 2.1, Collections semantics and the requirements for a set and bag semantic is the same. So to me it seems reasonable for hibernate to generate either a set or list in this situation.

Does anyone know how to setup a general rule within hibernate.reveng.xml that will force hibernate to a list collection as opposed to a set collection.

cheers


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 4:10 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
not possible at the moment.

And set and bag is *not* the same.

_________________
Max
Don't forget to rate


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.