The plugin I'm using is r3.
A given table can have these columns:
CREATE TABLE GRENLAND_AUTOMATIC.AQTE_TIMEVALUE
(
AQTE_GUID CHAR(38) NOT NULL,
TE_TOTIME DATE NOT NULL,
TE_VALUE NUMBER NULL,
AQTS_GUID CHAR(38) NULL,
AQQA_GUID CHAR(38) NULL,
AQQC_GUID CHAR(38) NULL,
TE_FROMTIME DATE NOT NULL,
TE_CHANGEDDATE DATE NULL,
TE_CHANGEDBY CHAR(38) NULL,
CONSTRAINT SYS_C007601
FOREIGN KEY (AQQC_GUID)
REFERENCES GRENLAND_AUTOMATIC.AQQC_QUALITYCONTROLLEVELFLAG (AQQC_GUID),
CONSTRAINT SYS_C007602
FOREIGN KEY (AQQA_GUID)
REFERENCES GRENLAND_AUTOMATIC.AQQA_QAFLAG (AQQA_GUID),
CONSTRAINT SYS_C007603
FOREIGN KEY (AQTS_GUID)
REFERENCES GRENLAND_AUTOMATIC.AQTS_TIMESERIES (AQTS_GUID)
)
Using middlegen as described in my previous post, I get the following result: (Again, sorry about the long post)
<?xaml 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>
<!--
Created by Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->
<class
name="com.nilu.adacs.hibernate.AQTE_TIMEVALUE"
table="AQTE_TIMEVALUE"
>
<meta attribute="field-description">
@hibernate.class
table="AQTE_TIMEVALUE"
</meta>
<composite-id>
<meta attribute="field-description">
@hibernate.id
generator-class="assigned"
</meta>
<key-property
name="aqteGuid"
column="AQTE_GUID"
type="java.lang.String"
length="38"
/>
<key-property
name="aqteGuid"
column="AQTE_GUID"
type="java.lang.String"
length="38"
/>
<key-property
name="aqteGuid"
column="AQTE_GUID"
type="java.lang.String"
length="38"
/>
</composite-id>
<property
name="teTotime"
type="java.sql.Timestamp"
column="TE_TOTIME"
not-null="true"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="TE_TOTIME"
length="7"
not-null="true"
</meta>
</property>
<property
name="teValue"
type="java.math.BigDecimal"
column="TE_VALUE"
length="22"
>
<meta attribute="field-description">
@hibernate.property
column="TE_VALUE"
length="22"
</meta>
</property>
<property
name="aqtsGuid"
type="java.lang.String"
column="AQTS_GUID"
length="38"
>
<meta attribute="field-description">
@hibernate.property
column="AQTS_GUID"
length="38"
</meta>
</property>
<property
name="aqqaGuid"
type="java.lang.String"
column="AQQA_GUID"
length="38"
>
<meta attribute="field-description">
@hibernate.property
column="AQQA_GUID"
length="38"
</meta>
</property>
<property
name="aqqcGuid"
type="java.lang.String"
column="AQQC_GUID"
length="38"
>
<meta attribute="field-description">
@hibernate.property
column="AQQC_GUID"
length="38"
</meta>
</property>
<property
name="teFromtime"
type="java.sql.Timestamp"
column="TE_FROMTIME"
not-null="true"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="TE_FROMTIME"
length="7"
not-null="true"
</meta>
</property>
<property
name="teChangeddate"
type="java.sql.Timestamp"
column="TE_CHANGEDDATE"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="TE_CHANGEDDATE"
length="7"
</meta>
</property>
<property
name="teChangedby"
type="java.lang.String"
column="TE_CHANGEDBY"
length="38"
>
<meta attribute="field-description">
@hibernate.property
column="TE_CHANGEDBY"
length="38"
</meta>
</property>
<property
name="teTotime"
type="java.sql.Timestamp"
column="TE_TOTIME"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="TE_TOTIME"
length="7"
</meta>
</property>
<property
name="teValue"
type="java.math.BigDecimal"
column="TE_VALUE"
length="22"
>
<meta attribute="field-description">
@hibernate.property
column="TE_VALUE"
length="22"
</meta>
</property>
<property
name="aqtsGuid"
type="java.lang.String"
column="AQTS_GUID"
length="38"
>
<meta attribute="field-description">
@hibernate.property
column="AQTS_GUID"
length="38"
</meta>
</property>
<property
name="aqqaGuid"
type="java.lang.String"
column="AQQA_GUID"
length="38"
>
<meta attribute="field-description">
@hibernate.property
column="AQQA_GUID"
length="38"
</meta>
</property>
<property
name="aqqcGuid"
type="java.lang.String"
column="AQQC_GUID"
length="38"
>
<meta attribute="field-description">
@hibernate.property
column="AQQC_GUID"
length="38"
</meta>
</property>
<property
name="teFromtime"
type="java.sql.Timestamp"
column="TE_FROMTIME"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="TE_FROMTIME"
length="7"
</meta>
</property>
<property
name="teTotime"
type="java.sql.Timestamp"
column="TE_TOTIME"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="TE_TOTIME"
length="7"
</meta>
</property>
<property
name="teValue"
type="java.math.BigDecimal"
column="TE_VALUE"
length="22"
>
<meta attribute="field-description">
@hibernate.property
column="TE_VALUE"
length="22"
</meta>
</property>
<property
name="teFromtime"
type="java.sql.Timestamp"
column="TE_FROMTIME"
length="7"
>
<meta attribute="field-description">
@hibernate.property
column="TE_FROMTIME"
length="7"
</meta>
</property>
<!-- associations -->
<!-- bi-directional many-to-one association to AQTS_TIMESERIES -->
<many-to-one
name="AQTS_TIMESERIES"
class="com.nilu.adacs.hibernate.AQTS_TIMESERIES"
not-null="true"
>
<meta attribute="field-description">
@hibernate.many-to-one
not-null="true"
@hibernate.column name="AQTS_GUID"
</meta>
<column name="AQTS_GUID" />
</many-to-one>
<!-- bi-directional one-to-many association to AQTS_TIMESERIES -->
<set
name="AQTS_TIMESERIES"
lazy="true"
inverse="true"
>
<meta attribute="field-description">
@hibernate.set
lazy="true"
inverse="true"
@hibernate.collection-key
column="AQTS_GUID"
@hibernate.collection-one-to-many
class="com.nilu.adacs.hibernate.AQTS_TIMESERIES"
</meta>
<key>
<column name="AQTS_GUID" />
</key>
<one-to-many
class="com.nilu.adacs.hibernate.AQTS_TIMESERIES"
/>
</set>
<!-- bi-directional one-to-many association to AQQC_QUALITYCONTROLLEVELFLAG -->
<set
name="AQQC_QUALITYCONTROLLEVELFLAG"
lazy="true"
inverse="true"
>
<meta attribute="field-description">
@hibernate.set
lazy="true"
inverse="true"
@hibernate.collection-key
column="AQQC_GUID"
@hibernate.collection-one-to-many
class="com.nilu.adacs.hibernate.AQQC_QUALITYCONTROLLEVELFLAG"
</meta>
<key>
<column name="AQQC_GUID" />
</key>
<one-to-many
class="com.nilu.adacs.hibernate.AQQC_QUALITYCONTROLLEVELFLAG"
/>
</set>
<!-- bi-directional one-to-many association to AQQA_QAFLAG -->
<set
name="AQQA_QAFLAG"
lazy="true"
inverse="true"
>
<meta attribute="field-description">
@hibernate.set
lazy="true"
inverse="true"
@hibernate.collection-key
column="AQQA_GUID"
@hibernate.collection-one-to-many
class="com.nilu.adacs.hibernate.AQQA_QAFLAG"
</meta>
<key>
<column name="AQQA_GUID" />
</key>
<one-to-many
class="com.nilu.adacs.hibernate.AQQA_QAFLAG"
/>
</set>
<!-- bi-directional many-to-one association to AQQC_QUALITYCONTROLLEVELFLAG -->
<many-to-one
name="AQQC_QUALITYCONTROLLEVELFLAG"
class="com.nilu.adacs.hibernate.AQQC_QUALITYCONTROLLEVELFLAG"
not-null="true"
>
<meta attribute="field-description">
@hibernate.many-to-one
not-null="true"
@hibernate.column name="AQQC_GUID"
</meta>
<column name="AQQC_GUID" />
</many-to-one>
<!-- bi-directional many-to-one association to AQQA_QAFLAG -->
<many-to-one
name="AQQA_QAFLAG"
class="com.nilu.adacs.hibernate.AQQA_QAFLAG"
not-null="true"
>
<meta attribute="field-description">
@hibernate.many-to-one
not-null="true"
@hibernate.column name="AQQA_GUID"
</meta>
<column name="AQQA_GUID" />
</many-to-one>
</class>
</hibernate-mapping>
========================================
So, for some reason I get triple the number of columns. Has anyone else had this error?
I would be very greatful for a reply.