users@glassfish.java.net

Re: exception inserted a deleted entity

From: <glassfish_at_javadesktop.org>
Date: Wed, 06 Jun 2007 01:11:51 PDT

> > void reset(){
> > q =
> em.createNamedQuery("deleteAll").executeQuery();
> > em.clear();
> > em.flush();
> > }
>
> One observations:
> You should use executeUpdate() instead of executeQuery() to execute the query

Your right, my code has executeUpdate but my brain was obviously off when i wrote the above down. Read as executeUpdate ...
[Message sent by forum member 'jsl123' (jsl123)]

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