users@glassfish.java.net

Re: _at_GeneratedValue(strategy = GenerationType.AUTO) throws exception

From: <glassfish_at_javadesktop.org>
Date: Tue, 04 Sep 2007 17:19:43 PDT

Can you try to see if a) calling em.remove() on them or b) using bulk delete of JPQL instead makes a difference? Are you closing em after each portion? If not, you are adding and adding instances to the em's cache. And you are for sure increasing the contents of the emf's cache - executing a native query makes em unaware of the changes.

If the above changes solve the problem, it can be a TopLink Essentials bug, if not, I suggest to try a jdbc test to simulate your situation to check if it's not a bug in MySQL.

thanks,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]

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