persistence@glassfish.java.net

Re: Changing the id of a managed entity

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Fri, 07 Aug 2009 11:04:47 -0700

Hi Farrukh,

You can delete the old one and insert the new, copying over the field values.

Regards,
-marina

Farrukh Najmi wrote:
> Hi Guys,
>
> I have a situation where I need to change the id of a manged entity
> within my transaction.
> I realize this seems questionable. What is the best way to accomplish this?
>
> Thanks for your help.
>