users@glassfish.java.net

Re: exception inserted a deleted entity

From: <glassfish_at_javadesktop.org>
Date: Fri, 18 May 2007 12:08:07 PDT

> I mean calling em.refresh(o);

Thought you did. What would happen if i called em.refresh on a detached entity?

> Do you a) use JPA bulk delete or b) execute your own
> JDBC statement, or c) perform SQL update via a CLI or
> some UI based tool (like SQLPLUS)?

I'm using JPA bulk update, i've tried using createNativeQuery and createNamedQuery, but both seem to behave the same. I've got the newest glassfish now, so i'll try again and see if it makes a difference.

> At what point of time do you commit the transactions?

I don't explicitly commit the transaction, i leave that to the container when my function quits. I've tried adding em.flush() but doesn't seem to help.

Thanks
[Message sent by forum member 'jsl123' (jsl123)]

http://forums.java.net/jive/thread.jspa?messageID=217892