my dog learned polymorphism*
The moose likes EJB and other Java EE Technologies and the fly likes One-To-Many collection not updating Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "One-To-Many collection not updating" Watch "One-To-Many collection not updating" New topic

One-To-Many collection not updating

Faraz Ali
Ranch Hand

Joined: May 15, 2008
Posts: 108

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?
jQuery in Action, 2nd edition
subject: One-To-Many collection not updating
Similar Threads
Problem with CMR : please help
some basic questions about clearcase
One-To-Many bidirectional
One-to-Many collection
SVN Merging Branches