• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

One to Many mapping with "Invert "option to do operation from both the Tables effective on both ?

 
Shyam Singh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
able to do one to many mapping but operation possible from one table only ..

The Table "grouptable" -->

id p.k
name



The Table "story " -->

id p.k
info



I am able to delete rows of both table by "Group" ... want to do delete from both table by deleting "Story" row.

i heard this can be done by " invert " ----- Some body help

 
tanay purwar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<set name="stories" inverse="true" cascade="all-delete-orphan">
<key column="parent_id"/>
<one-to-many class="Story"/>
</set>



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic