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>