Removing associated entity JPA

Posted by Marcel on Stack Overflow See other posts from Stack Overflow or by Marcel
Published on 2010-03-19T11:18:09Z Indexed on 2010/03/19 11:21 UTC
Read the original article Hit count: 343

Filed under:
|
|
|

Hi

I have a question regarding JPA persistence in Glassfish. Situation: I have a Supplier class that has a 1:n bidirectional relation to SupplierAddress. I would like to have the following behaviour: If I remove the SupplierAddress object from the List in the Supplier object and update it via the merge(supplierobject), the SupplierAddress tupel/object should be deleted. Is there an annotation do configure it like this or do I have to delete it manually. Any help would be very appreciated.

Greetings

Marcel

© Stack Overflow or respective owner

Related posts about jpa

Related posts about glassfish