|
Hi,
i'm using Hibernate version:1.2.0 and realized a many-to-many association like shown in 6.8. It does almost what i want it, but in the table of the inverse end it generates double entries (only primary and foreign key) and so also key violations.
To be honest i don't know how hibernate may store this at all, but maybe you can help me.
the relevant mappings are
<bag name="Fahrzeugkomponenten" table="Komponente" lazy="true">
<key column="FahrzeugzuordnungIst"/>
<many-to-many class="Komponente" column="KomponentenId"/>
</bag>
and
<bag name="FahrzeugzuordnungIst" table="Komponente" inverse="true" lazy="true">
<key column="KomponentenId"/>
<many-to-many class="Fahrzeug" column="FahrzeugId"/>
</bag>
Thank you.
Greets Hellmut
|