Bug 295618 - duplicate entity "MachineState" with two different mappings causes test to fail
Summary: duplicate entity "MachineState" with two different mappings causes test to fail
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P4 minor (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2009-11-19 11:49 EST by Adrian Goerler CLA
Modified: 2022-06-09 10:22 EDT (History)
1 user (show)

See Also:


Attachments
Patch changing the name of the test table (617 bytes, patch)
2009-11-19 11:54 EST, Adrian Goerler CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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