users@glassfish.java.net

Re: problem removing entity

From: Daniel Cavalcanti <dhcavalcanti_at_gmail.com>
Date: Mon, 18 Jun 2007 14:14:26 -0400

I'll try that...
thanks!

On 6/18/07, glassfish_at_javadesktop.org <glassfish_at_javadesktop.org> wrote:
>
> You have to call remove on the managed entity - the object returned from
> the merge call is managed.
>
> [code]
> Unit managedUnit = em.merge(unit);
> em.remove(managedUnit);
> [/code]
> The persist api will take a new entity and make it managed, the merge api
> will take a detached object and return the managed object.
>
> Best Regards,
> Chris
> [Message sent by forum member 'chris_delahunt' (chris_delahunt)]
>
> http://forums.java.net/jive/thread.jspa?messageID=222701
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>