Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331538

Summary: Constraint Violation when deleting rows
Product: z_Archived Reporter: Fred Toussi <fredt>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: christopher.delahunt, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Fred Toussi CLA 2010-12-01 08:44:02 EST
Build Identifier: EclipseLink v. 2.10

One of the JPA tests published at http://www.jpab.org/EclipseLink.html causes this failure when used with four different open source databases. The exception is MySQL which by default does not enforce foreign key constraints.

Sample error message:

DELETE on table 'NODE' caused a violation of foreign key constraint 'FK_NODE_CHILD1_ID' for key (110036).  The statement has been rolled back.

Note, the reported HSQLDB 2.0.0 failures relate to the separate issue with lack of size specification with some VARCHAR(n) declarations. This can be avoided by specifying sql.enforce_strict_size=false;sql.enforce_size=false in the HSQLDB connection URL.

Reproducible: Always

Steps to Reproduce:
1. Download the Jpab package
2. Follow instructions to test with EclipseLink and one of the databases
Comment 1 Tom Ware CLA 2010-12-09 09:10:35 EST
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 2 Chris Delahunt CLA 2011-01-05 13:52:55 EST
Underlying issue is deleting self referencing relationship as described in bug 328040

*** This bug has been marked as a duplicate of bug 328040 ***
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:34:10 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink