ErikFK wrote:
Hi,
ijgomez wrote:
I think that the *.Class an *.hbm.xml, which I generated, are correct (Im using for genereted MyEclipse plugin). And the Data Model is correct.
It might be very helpful if you could provide the significant extracts of the files you mention.
I would suspect the problem to be there - and should it be a Hibernate problem then having this information makes it easier to reproduce the "bug".
Erik
Hi,
the significant extracts of the *.hbm.xml files is:
TableA.hbm.xml:
Code:
....
<class name="TableA" table="TABLE_A">
<composite-id name="id" class="TableAKey">
<key-many-to-one name="tableB2" column="COLUMN_A" class="TableB"/>
<key-many-to-one name="tableB1" column="COLUMN_B" class="TableB"/>
<key-many-to-one name="tableB5" column="COLUMN_C" class="SigmatMedidaPume15"/>
<key-many-to-one name="tableB3" column="COLUMN_D" class="TableB"/>
<key-many-to-one name="tableB4" column="COLUMN_E" class="TableB"/>
</composite-id>
....
</class>
TableB.hbm.xml:
Code:
...
<class name="TableB" table="TABLE_B">
<composite-id name="id" class="TableBKey">
<key-many-to-one name="columnA" column="COLUMN_A" class="TableCC"/>
<key-many-to-one name="columnB" column="COLUMN_B" class="TableDD"/>
<key-many-to-one name="columnC" column="COLUMN_C" class="TableEE"/>
<key-property name="columnD" column="COLUMN_D" type="java.util.Date"/>
<key-property name="columnE" column="COLUMN_E" type="java.lang.String"/>
</composite-id>
.....
.....
<set name="tableASet" inverse="true">
<key column="COLUMN_A"/>
<one-to-many class="TablaA"/>
</set>
<set name="tableA1Set" inverse="true">
<key column="COLUMN_B"/>
<one-to-many class="TablaA"/>
</set>
<set name="tableA2Set" inverse="true">
<key column="COLUMN_C"/>
<one-to-many class="TablaA"/>
</set>
<set name="tableA3Set" inverse="true">
<key column="COLUMN_D"/>
<one-to-many class="TablaA"/>
</set>
<set name="tableA4Set" inverse="true">
<key column="COLUMN_E"/>
<one-to-many class="TablaA"/>
</set>
</class>
...