Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

One-To-Many collection not updating

 
Faraz Ali
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have implemented a one-to-many birectional relationship. The class City maintains a collection of the instances of class Branch.

When i am doing any updates in the collection (like changed the branch address) and than calling merge on the City bean, the changes are reflected in the database.

But when i am removing an instance from the collection, and than calling merge on the City bean, its not deleting the branch from the db.

What's the reason? and how to fix it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic