You can't. If a flush fails and an exception propagates out of the database, there is
no practical way for the ORM to figure out what the current state of the database is, and
resynchronize the in-memory state to that.
Check your constraint first.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057926#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...