|(no subject) [message #719070]
||Thu, 25 August 2011 18:24
| Dave M
Registered: July 2009
I have a unidirectional one-to-many that is causing problems. It is mapped using a join table (since it's unidirectional). The instance variable in the entity is typed as a Set. I have verified that the equals and hashCode methods of the entity whose instances are stored in that Set are well-behaved (i.e., the state on which they are based is not mutated after insertion into the Set, etc.). And I have inspected the Set of the offending entity at runtime and I don't see any duplicates.|
The thing is....
When running with classes that have been statically woven I get the error shown below. When I turn weaving off the error no longer occurs.
Just wondering if anyone has an idea why that would be?
javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '3350-3379' for key 'PRIMARY'
Error Code: 1062
Call: INSERT INTO myschema.SUBGRAPH_MEMBERS (MEMBER_ID, SUBGRAPH_ID) VALUES (?, ?)
bind => [3379, 3350]
Query: DataModifyQuery(name="subgraphMembers" sql="INSERT INTO myschema.SUBGRAPH_MEMBERS (MEMBER_ID, SUBGRAPH_ID) VALUES (?, ?)")
Powered by FUDForum
. Page generated in 0.01447 seconds