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

Bug 347010

Summary: FK constraint violation when removing an Entity that has multiple levels of inheritance
Product: z_Archived Reporter: Zeb Ford-Reitz <zeb.ford-reitz>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P2 CC: eclipselink.orm-inbox, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
small example to reproduce the error none

Description Zeb Ford-Reitz CLA 2011-05-24 11:45:30 EDT
Created attachment 196455 [details]
small example to reproduce the error

The violation occurs for a many to many relationship between the Entity to remove and other Entities of the same type.

The attached example illustrates a configuration under which this error occurs. The error occurs with EclipseLink 2.3 RC1, but not with EclipseLink 2.2.

Since I am unable to enter EclipseLink 2.3 into the Version field for this bug report, I have set the version to "unspecified".
Comment 1 Tom Ware CLA 2011-05-24 11:54:46 EDT
Setting initial target to 2.3 - this is a regression.  It is possible this may slip to 2.3.1 because we are allowing limited code in 2.3 due to the proximity of the release date.
Comment 2 Zeb Ford-Reitz CLA 2011-05-27 08:36:35 EDT
The workaround that Tom suggested on the mailing list:

http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg06256.html

worked for our use case. Therefore, this bug no longer blocks bug 345106.
Comment 3 Tom Ware CLA 2011-05-31 09:45:22 EDT
Changing to 2.3.1 as we have run out of time for 2.3.0.
Comment 4 Tom Ware CLA 2011-08-10 13:35:29 EDT
When I run the example on the latest 2.3.1 code, I do not see an exception in the recreation.  I have changed the DB to MySQL, but other than that everything is the same.

Does the recreation still show the problem for you on the latest 2.3.1 nightly or trunk nightly?
Comment 5 Zeb Ford-Reitz CLA 2011-08-11 03:04:12 EDT
The problem does not occur for me when using the 2.3.1 nightly with buildId 20110811.
Comment 6 Tom Ware CLA 2011-08-11 08:10:44 EDT
Closing as fixed based on the above comment.
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:31:16 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink