jim li wrote:in a application or container managed entity manager with persistenctype = extended, if a entity is deleted, is it detached? if it is dettached, is there a way to reattached it back
If we go by the LIFE CYCLE of an Entiry Instance then when you delete an entity it goes from 'Managed' State to 'Removed' state (you will use remove methond ).
it does not go to 'Detached ' State.
and again according to the LIFE CYCLE if an Entity is in 'Removed' State you can restore it by again Calling persist method.
I think LIFE CYCLE Should be same regardless of which scope you use(normal or extended)
So i THINK it applies to your question also.
if a entity is deleted, is it detached? No I think it is in Removed state.
f it is dettached, is there a way to reattached it back YES You could have had done that using merge method again but if it would have in DETACHED remember it is in Removed State.
You may try this practically........