Bug 295618

Summary: duplicate entity "MachineState" with two different mappings causes test to fail
Product: z_Archived Reporter: Adrian Goerler <adrian.goerler>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P4 CC: douglas.clarke
Version: unspecifiedKeywords: test
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch changing the name of the test table none

Description Adrian Goerler CLA 2009-11-19 11:49:11 EST
In the test suite eclipselink.jpa.test, there are two entities 

org.eclipse.persistence.testing.models.jpa.ddlgeneration.MachineState

and 

org.eclipse.persistence.testing.models.jpa.cascadedeletes.MachineState.

Both are mapped to the table "MACHINESTATE". In the "cascadedeletes" model there is additionaly a foreign key constraint referencing the table "MACHINESTATE".

Executing the eclipselink.jpa.test test suite leaves the table "MACHINESTATE" in the state corresponding to the "cascadedeletes" model with the fk constraint on it.

If I execute the testsuite again, the "ddlgeneration" model cannot be properly as the table "MACHINESTATE" can't be dropped/created as there is a constraint on the table not known to the "ddlgeneration" model. Consequently, a test fails.

To fix this, I propose to rename one version of "MACHINESTATE" to "MACHINE_STATE".
Comment 1 Adrian Goerler CLA 2009-11-19 11:54:06 EST
Created attachment 152605 [details]
Patch changing the name of the test table
Comment 2 Adrian Goerler CLA 2009-11-20 10:28:25 EST
SVN rev#5837
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:22:30 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink