• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to delete many side objects in merge operation?  RSS feed

Nalaka Gamagelk
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In My application I have one to many relationshp between Author and Book classes.
Author 1---->* Book. I have done the mappping as follows;



I am using merge operation for updating detached objects. When ever I am updating or adding Book objects and Merging the Author object, changes are reflected in the database. However when I client have remove Book object (Say in the database there are three books related to Author, But now I am caling merge operation with two Books objects with matching pk in the collection.

But I do not see missing Book object being deleted from the Book table. Can someone help me explaining how to do this. Is there any way to remove books (many side) without explicitly deleting those. i.e. By Merging Author object.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!