-->
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: hbm2java no longer creates full constructor
PostPosted: Wed Jun 01, 2005 6:29 am 
Newbie

Joined: Wed Jun 01, 2005 6:18 am
Posts: 9
I am migrating from Hibernate 2 to Hibernate 3 and my generated pojo java code no longer has full contructors. It seems that in the new hmb2java that full contructors are no longer generated?

How can I get these full constructors to be generated again?

The hbm.xml for one of the pojos that used to have a full constructor is listed below.

Mapping document:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1

http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->

<class
name="uk.co.fresca.pojo.OrderItem"
table="order_item"
>
<meta attribute="class-description" inherit="false">
@hibernate.class
table="order_item"
</meta>

<id
name="id"
type="java.lang.Integer"
column="id"
>
<meta attribute="field-description">
@hibernate.id
generator-class="assigned"
type="java.lang.Integer"
column="id"

</meta>
<generator class="identity" />
</id>

<property
name="quantity"
type="int"
column="quantity"
not-null="true"
length="11"
>
<meta attribute="field-description">
@hibernate.property
column="quantity"
length="11"
not-null="true"
</meta>
</property>
<property
name="unitNetPrice"
type="float"
column="unit_net_price"
not-null="true"
length="8"
>
<meta attribute="field-description">
@hibernate.property
column="unit_net_price"
length="8"
not-null="true"
</meta>
</property>
<property
name="unitGrossPrice"
type="float"
column="unit_gross_price"
not-null="true"
length="8"
>
<meta attribute="field-description">
@hibernate.property
column="unit_gross_price"
length="8"
not-null="true"
</meta>
</property>
<property
name="lineStatus"
type="java.lang.String"
column="line_status"
not-null="true"
length="50"
>
<meta attribute="field-description">
@hibernate.property
column="line_status"
length="50"
not-null="true"
</meta>
</property>
<property
name="statusQuantity"
type="java.lang.Integer"
column="status_quantity"
length="3"
>
<meta attribute="field-description">
@hibernate.property
column="status_quantity"
length="3"
</meta>
</property>
<property
name="statusDescription"
type="java.lang.String"
column="status_description"
length="65535"
>
<meta attribute="field-description">
@hibernate.property
column="status_description"
length="65535"
</meta>
</property>
<property
name="dispatchDate"
type="java.sql.Date"
column="dispatch_date"
length="10"
>
<meta attribute="field-description">
@hibernate.property
column="dispatch_date"
length="10"
</meta>
</property>
<property
name="returnDate"
type="java.sql.Date"
column="return_date"
length="10"
>
<meta attribute="field-description">
@hibernate.property
column="return_date"
length="10"
</meta>
</property>
<property
name="comments"
type="java.lang.String"
column="comments"
length="255"
>
<meta attribute="field-description">
@hibernate.property
column="comments"
length="255"
</meta>
</property>
<property
name="createdDts"
type="java.sql.Timestamp"
column="created_dts"
not-null="true"
length="19"
>
<meta attribute="field-description">
@hibernate.property
column="created_dts"
length="19"
not-null="true"
</meta>
</property>
<property
name="createdBy"
type="java.lang.String"
column="created_by"
not-null="true"
length="50"
>
<meta attribute="field-description">
@hibernate.property
column="created_by"
length="50"
not-null="true"
</meta>
</property>
<property
name="lastUpdatedDts"
type="java.sql.Timestamp"
column="last_updated_dts"
length="14"
>
<meta attribute="field-description">
@hibernate.property
column="last_updated_dts"
length="14"
</meta>
</property>
<property
name="lastUpdatedBy"
type="java.lang.String"
column="last_updated_by"
not-null="true"
length="50"
>
<meta attribute="field-description">
@hibernate.property
column="last_updated_by"
length="50"
not-null="true"
</meta>
</property>

<!-- Associations -->

<!-- bi-directional many-to-one association to Product -->
<many-to-one
name="product"
class="uk.co.fresca.pojo.Product"
not-null="true"
>
<meta attribute="field-description">
@hibernate.many-to-one
not-null="true"
@hibernate.column name="sku"
</meta>
<column name="sku" />
</many-to-one>
<!-- bi-directional many-to-one association to Order -->
<many-to-one
name="order"
class="uk.co.fresca.pojo.Order"
not-null="true"
>
<meta attribute="field-description">
@hibernate.many-to-one
not-null="true"
@hibernate.column name="order_id"
</meta>
<column name="order_id" />
</many-to-one>

</class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 01, 2005 3:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
add a request for it. its not implemented yet in H3 toolset.

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