-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: many-to-one / one-to-many bidirectional with inverse="t
PostPosted: Fri May 14, 2004 5:56 pm 
Beginner
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.