-->
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.  [ 4 posts ] 
Author Message
 Post subject: Composite-element classes not generated by H3 hbm2java
PostPosted: Thu May 12, 2005 4:39 pm 
Beginner
Beginner

Joined: Thu Jan 29, 2004 6:51 pm
Posts: 24
Location: Boulder, CO USA
Hibernate Tools version: 3.0.0alpha3 (from CVS on 5/12)

hbm2java from the 2.1.3 toolset detected and generated component classes defined by the <composite-element> tag, while hbm2java from the H3 toolset does not. I don't know if I need to change something in the mapping, or if it is a bug, but I can find no related errors in the velocity output.

Here is the association:

<idbag
name="customers"
table="CUSTOMER_SERVER_MAP" lazy="false">
<collection-id column="CUSTOMER_SERVER_MAP_ID" type="long">
<generator class="sequence">
<param name="sequence">CUSTOMER_SERVER_MAP_SEQ</param>
</generator>
</collection-id>
<key column="SERVER_ID" />
<composite-element class="AssociatedCustomer">
<property name="modifyUserId" type="string" column="MODIFY_USER_ID" not-null="true"/>
<property name="modifyDate" type="timestamp" column="MODIFY_DATE" not-null="true"/>
<many-to-one name="customer" class="Customer" not-null="true" column="CUSTOMER_NBR"/>
</composite-element>
</idbag>

The AssociatedCustomer class is generated by H2, but not by H3.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 20, 2005 1:59 pm 
Newbie

Joined: Fri Apr 08, 2005 6:26 am
Posts: 6
Location: Edinburgh, UK
I have the same issue with the following mapping:

snip...
<list name="interfaces" table="product_interface">
<key column="product_fk"/>
<list-index column="interface_index"/>
<composite-element class="ProductInterface">
<many-to-one name="mac_address_fk" class="MacAddress"/>
</composite-element>
</list>
...snip

The class ProductInterface is not created by the HibernateTool ant task hbm2java, but the database table is correctly created by hbm2ddl.

This occurs with the HEAD version of the Tools(200506201600)

Regards,
Chris


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 20, 2005 2:35 pm 
Newbie

Joined: Fri Apr 08, 2005 6:26 am
Posts: 6
Location: Edinburgh, UK
line 86 of:
HibernateExt\tools\src\java\org\hibernate\tool\hbm2x\ConfigurationNavigator.java
gives us a hint...
Code:
// TODO: composite-element in a collection.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2005 3:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes - known bug

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