users@glassfish.java.net

Re: Problem with TopLink - Generic Entities

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Thu, 03 Dec 2009 10:05:37 -0800

You need to explicitly delete the offer. Remove from the collection is just that
- nullifying relationships.

HTH,
-marina

glassfish_at_javadesktop.org wrote:
> Hello,
> I have a problem with TopLink an generic entities. As attachment there is a part of my data model:
>
> The tables that TopLink created are: ModelItem, Customer, Customer_Offer, Offer. The problem is that when I delete a offer. Only the entry in the table Customer_Offer was deleted. The entries in the tables MotelItem and Offer weren't deleted. To delete a offer I use the following code: customer.getOffers().remove(offer); entityManager.merge(customer);
>
> I have no problems when I delete a customer. Here the entries in the tables Customer, Customer_Offer and Offer were correctly delete. Where is the problem. Have anyone an idea?
>
> Thanks
> [Message sent by forum member 'donmarcoef' ]
>
> http://forums.java.net/jive/thread.jspa?messageID=374550
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>