-->
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: Hibernate3 tools CodeGenerator many-to-one problem
PostPosted: Fri Apr 01, 2005 8:48 am 
Newbie

Joined: Fri Apr 01, 2005 8:32 am
Posts: 1
I just downloaded hibernate3 and tool set.
When I generated java classes from hbm.xml,
I realized that many-to-one relations are generated as
java.util.Map
Is this because of the Dynamic Model feature ?
Is there a way to tell to the codegenerator to generate those as class association ?

My hbm.xml is like
----------------------------------
<class name="Il" table="Il" >
<id type="int" name="plakaNo" column="plakaNo">
<generator class="assigned" />
</id>
<property name="ad" type="string" length="40" />
</class>
<class name="Acente" table="Acente">
<id type="string" name="acenteKod" column="acenteKod" length="12">
<generator class="assigned" />
</id>
<property name="ad" type="string" length="40" />
<many-to-one name="il" class="Il" column="plakaNo" not-null="true" />
</class>
-----------------------------
Generated Acente class is like
--------------------------------
public class Acente implements Serializable {
/** nullable persistent field */
private java.util.Map il;

--------------------------------
What I was expecting is
-------------------------------
public class Acente implements Serializable {
/** nullable persistent field */
private String ad;

/** nullable persistent field */
private Il il;
------------------------------


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 01, 2005 9:14 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmmm....havent seen that before.

please post a failing test case to our jira.

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