This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Merge operation does not remove from db dependent objects?

 
D. Formenton
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have two tables: Persons and addresses associated to persons by a foreign key.

When I add a new address to a person the addessesCollection object and the visual object (JSF) updates and the merge operation regularly add a new row to the addresses table of database.

BUT if I remove an existing address, again the addessesCollection object and the visual object (JSF) updates, but the merge operation instead has no effect on addresses table, and the database remain unchanged.

Is there any error in my code or it is a normal feature of merge? And if so, how I can delete the database row according the addressesCollection (to align to)?

Thank you.

Domencio
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your mapping?

How do your code remove the relationship?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic