-->
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.  [ 1 post ] 
Author Message
 Post subject: hbm2java:get/set not generated for nested-composite-element
PostPosted: Tue Oct 19, 2004 8:24 pm 
Newbie

Joined: Tue Oct 19, 2004 8:04 pm
Posts: 8
Location: Newcastle, Australia
Hello,

In trying to map to a legacy database I find that the hbm2java doesn't generate the getter/setter for nested-composite-elements. If I manually fix the code and run it, it works OK.

Any ideas?

Thanks

Michael McGovern
Fuji Xerox Australia



Hibernate version:2.1

Mapping documents:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="au.com.fujixerox.xos.meter.model.ImportMeterReadingHeader" table="corp_trans_from_web_header">
<cache usage="read-write"/>
<id name="id" column="id_seq" access="field" type="long">
<generator class="sequence">
<param name="sequence">corp_trans_id_seq_s</param>
</generator>
</id>
<property name="dateCreated" not-null="true" column="date_created" type="date"/>
<property name="transType" not-null="true" column="trans_type" type="string"/>
<property name="transSubType" not-null="true" column="trans_subtype" type="string"/>
<property name="accountNumber" column="acct_no" type="string"/>
<property name="adminBranch" column="admin_branch" type="string"/>
<property name="userId" column="usr_id" type="string"/>
<property name="emulatedUserId" column="emulated_user_id" type="string"/>
<list name="details" lazy="false" table="corp_trans_from_web_detail" >
<key column="id_seq"/>
<index column="detail_id"/>
<composite-element class="au.com.fujixerox.xos.meter.model.ImportMeterReadingDetail">
<property name="modelNumber" not-null="true" column="model_no" type="string">
<meta attribute="use-in-tostring">true</meta>
</property>
<property name="serialNumber" not-null="true" column="product_serial_no" type="string">
<meta attribute="use-in-tostring">true</meta>
</property>
<property name="generatedSerialNumberFlag" not-null="true" column="gen_serial_no_flag" type="string"/>
<property name="deliveryAddressSequence" column="deliv_addr_seq" type="string"/>
<nested-composite-element name="meterReadingItem1" class="au.com.fujixerox.xos.meter.model.ImportMeterReadingItem" access="property">
<property name="meterId" column="meter_id_1" type="string"/>
<property name="readingValue" column="meter_reading_value_1" type="long"/>
<property name="readingDate" column="meter_reading_date_1" type="date"/>
<property name="source" column="meter_source_1" type="string"/>
</nested-composite-element>
<nested-composite-element name="meterReadingItem2" class="au.com.fujixerox.xos.meter.model.ImportMeterReadingItem" access="property">
<property name="meterId" column="meter_id_2" type="string"/>
<property name="readingValue" column="meter_reading_value_2" type="long"/>
<property name="readingDate" column="meter_reading_date_2" type="date"/>
<property name="source" column="meter_source_2" type="string"/>
</nested-composite-element>
<nested-composite-element name="meterReadingItem3" class="au.com.fujixerox.xos.meter.model.ImportMeterReadingItem" access="property">
<property name="meterId" column="meter_id_3" type="string"/>
<property name="readingValue" column="meter_reading_value_3" type="long"/>
<property name="readingDate" column="meter_reading_date_3" type="date"/>
<property name="source" column="meter_source_3" type="string"/>
</nested-composite-element>
<nested-composite-element name="meterReadingItem4" class="au.com.fujixerox.xos.meter.model.ImportMeterReadingItem" access="property">
<property name="meterId" column="meter_id_4" type="string"/>
<property name="readingValue" column="meter_reading_value_4" type="long"/>
<property name="readingDate" column="meter_reading_date_4" type="date"/>
<property name="source" column="meter_source_4" type="string"/>
</nested-composite-element>
<nested-composite-element name="meterReadingItem5" class="au.com.fujixerox.xos.meter.model.ImportMeterReadingItem" access="property">
<property name="meterId" column="meter_id_5" type="string"/>
<property name="readingValue" column="meter_reading_value_5" type="long"/>
<property name="readingDate" column="meter_reading_date_5" type="date"/>
<property name="source" column="meter_source_5" type="string"/>
</nested-composite-element>

</composite-element>
</list>
</class>

</hibernate-mapping>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.