OpenJPA: Generated SQL contains extra UPDATEs
I’m trying to use OpenJPA to insert some entries in the database and I’m getting a strange number of UPDATEs beside the INSERTs. I isolated the problem to the following snippet of code private void start() { EntityManagerFactory emf = Persistence.createEntityManagerFactory("persistencexmltest1PU"); EntityManager em = emf.createEntityManager(); for (int i = 0; i < 10; i**) { em.getTransaction().begin(); MyEntity n =new MyEntity(); n.setValue(i); em.persist(n); em.getTransaction().commit(); } } The generated SQL looks like this: ...