Hi,
I'm probably missing something, but shouldn't many-to-many sets behave the same way as composite-element sets in delete situation?
I have an entity which has many-to-many set without cascades (I don't want it to cascade over the link table). When I try to make session.delete("...") it fails, because link table foreign key constraints kick in.
Only delete I'm seeing in the log is the parent entitys. That's when it fails. Link table rows should be deleted first.
Code:
<set
name="types"
lazy="false"
inverse="false"
table="LINK"
>
<key>
<column name="THING_ID" />
</key>
<many-to-many
column="TYPE_ID"
class="zzz.Type" />
</set>
...
session.delete("from Thing thing where thing.prop > 123");
Thanks in advance!