[jboss-user] [EJB 3.0] - What causes EntityExistsException?
lightbulb432
do-not-reply at jboss.com
Mon Dec 18 00:47:35 EST 2006
What causes an EntityExistsException to be thrown from EntityManager's persist method?
Is it anytime the database has a row with the same primary key? Or is it anytime the database has a row with any unique key being the same? Or do all fields have to be the same? Does it check existing entities in the persistence context that haven't necessarily yet been flushed to the database?
Could somebody please explain what it takes for two entities (or rows in the database) to be seen as the same so as to throw an EntityExistsException (i.e. if they have some fields being the same, but not all)?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994558#3994558
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994558
More information about the jboss-user
mailing list