Hello farzad,
Thanks for taking the time to read through my problem. I think in terms
of workaround solution I could just make one linkage table for every
category of keywords. I would prefer that to custom update sql.
I was hoping to get a solution which works analogous to the Address example in the hibernate reference manual
Code:
<class name="Person">
<id name="name"/>
<one-to-one name="address"
cascade="all">
<formula>name</formula>
<formula>'HOME'</formula>
</one-to-one>
<one-to-one name="mailingAddress"
cascade="all">
<formula>name</formula>
<formula>'MAILING'</formula>
</one-to-one>
</class>
<class name="Address" batch-size="2"
check="addressType in ('MAILING', 'HOME', 'BUSINESS')">
<composite-id>
<key-many-to-one name="person"
column="personName"/>
<key-property name="type"
column="addressType"/>
</composite-id>
<property name="street" type="text"/>
<property name="state"/>
<property name="zip"/>
</class>
Its very close, but I'm not sure how to modify it for a many-to-many linkage table.
Arne