Beginner |
 |
Joined: Sat Aug 30, 2003 1:36 am Posts: 47 Location: Calgary, AB
|
I have this mapping on parent object;
<bag name="contingencies" cascade="all" inverse="true" >
<key column="riskKey"/>
<one-to-many class="Contingency"/>
</bag>
and this mapping on child:
<many-to-one name="risk" column="riskKey" class="Risk" />
When I save the parent object, the Contingency objects aren't when you add them to the parent collection. I take it this is because contingency.setRisk isn't called before save.
It would be nice to be able to set inverse="true" on the many-to-one and perhaps someone can enlighten me on why you can't do that.
|
|