Why doesn't my remove() actually remove reference from DB using JPA @Many-to-Many?

Yes to both -- I have figured out what I was doing wrong, and will submit my own answer to it. – Jim Kiley Mar 31 '09 at 15:45.

Turned out that the problem was that I was not clearing the relationship in both directions. I would remove a Product from the OrderSystem but not remove the OrderSystem from the Product.

You need to remove relationship from both sides. The way to do it is: // Find your 2 beans with entityManager product. SetOrderSystems(null); orderSystem.

SetProducts(null); // then persist() and flush().

This is not a real answer. Please, delete it and post as as comment instead. Also, I'd like to ask you to take a few minutes to read the FAQ - stackoverflow.Com/faq.

– jweyrich Dec 16 '10 at 10:38 I've changed my previous post by a code solution. Now this question has a real interest ;-) – Vince Dec 16 '10 at 13:03 excellent! Removed the downvote.

– jweyrich Dec 17 '10 at 10:50.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions