Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
1.2.0
-
None
-
None
-
Windows-7, Java-8, Netbeans-8.0.2
Description
It seems like when in the same EJB transaction, save() and findByxxx() is called, then delta-spike inserts the entity twice [once in save() and other time in findByxxx()] and gives a constraint violation exception.
After some debuggin, it seems like save() gives a "INSERT" query in DB and findByxxx() method calls a flush which again gives the same "INSERT" query in DB [INSERT query from save() is not removed from EntityManager] and gives constraint violation exception.