views:

12

answers:

0

Hi,

I have the following map in my entity:

<map cascade="all-delete-orphan" inverse="true" name="ManyToMany" mutable="true" table="ManyToManyTable">
  <key column="TableAId" />
  <index column="EnumValueId" type="MyEnum, MyAssembly" />
  <many-to-many column="TableBId" class="MyBClass, MyAssembly"/>
</map>

This creates the table fine, but i'm unable to add something to the collection for an existing entity and have it save. I get no data in the join table.

Also, how would I specify that each of the three columns is part of the primary key of the join table?

Thanks Andy

related questions