-->
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: Force hibernate tools to use map instead set
PostPosted: Wed Feb 28, 2007 6:16 am 
Newbie

Joined: Tue Jan 16, 2007 7:34 am
Posts: 9
Hi

I've last Hibernate tools Eclipse plugin and used it to reverse engineering a MySQL DB.

Everything went well except that it generates sets like this:

Code:
<set name="nreferences" inverse="true">
            <key>
                <column name="notification_id" not-null="true">
                    <comment></comment>
                </column>
            </key>
            <one-to-many class="com.bs.proteo.notifications.bl.beans.Nreference" />
        </set>



My application is an Axis 1.3 web service and it transforms sets to array of objects so I prefere to use java.util.map.

How could I force Hibernate Tools to generate maps instead sets or how could I transform the above set to map ?

Thanks in advance

C


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 19, 2007 10:58 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
there is not enough information in a db to figure out you want a map instead of a set.

read hibernate reference on using <map>

_________________
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.