I have a set defined like so:
Code:
<set name="optionServices" table="target_link" where="from_target_type='s' and to_target_type='s'" lazy="false">
<key>
<column name="from_target_id"/>
</key>
<element type="java.lang.Long" column="to_target_id" />
</set>
The mapping works fine for reading values but when I try to persist the set I would like from_target_type and to_target_type set to 's'.
Hibernate current generates only:
Code:
insert into target_link (from_target_id, to_target_id) values (?, ?)
How do I get hibernate to insert values for from_target_type and to_target_type as well?