Hi,
I was wondering if what I'm trying to achieve is possible, and if so... how?
Basically I have a
many-to-many mapping between two objects, relating to three tables (one for each of the classes, and a third to link the two together).
However, the third linking table needs to have additional values (namely
last_updated_by and
last_updated_date).
i.e. TBL_A_TO_B needs 2 more columns in addition to the 2 keys.
How would I go about modelling these extra columns so that they can be updated??
Any help much appreciated!!
Paul
Code:
<class name="my.package.ClassA" table="TBL_A">
<id name="aId" type="big_decimal">
<column name="A_ID" precision="22" scale="0" />
<generator class="assigned" />
</id>
<property...
...property>
<set name="bs" table="TBL_A_TO_B">
<key>
<column name="A_ID" precision="22" scale="0" not-null="true" />
</key>
<many-to-many entity-name="my.package.ClassB">
<column name="B_ID" precision="22" scale="0" not-null="true" />
</many-to-many>
</set>
</class>