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

Bug 333039

Summary: @ElementCollection with @MapKeyJoinColumn and @Embeddable as value not persisting in correct order
Product: z_Archived Reporter: Scott Van Wart <silvaran>
Component: EclipselinkAssignee: Project Inbox <eclipselink.orm-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P2 CC: tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Sample test project (without dependency libraries)
none
Log from running the sample project none

Description Scott Van Wart CLA 2010-12-21 14:22:34 EST
Build Identifier: 20100917-0705

As first mentioned here:

http://www.eclipse.org/forums/index.php?t=msg&goto=645551&S=529dad6b5f902676ce27656e1175fcdb

I have two entities and an embeddable; one entity is the key of a Map in the other entity, while the embeddable is the value in the Map.  When persisting entities, they're inserted in the incorrect order during transaction commit.

Reproducible: Always

Steps to Reproduce:
1. Unpack the attached sample project and cd into the "elbugs" directory.
2. Create a lib/ directory to hold dependant libraries (not included @7.5MB)
3. Copy eclipselink.jar (2.1.2), hsqldb.jar (2.0.0) and jpa2.jar into the lib/ directory
4. Compile the files: $ javac -cp lib/eclipselink.jar:lib/jpa2.jar src/snv/*.java
5. Run RunTest: $ java -cp lib/eclipselink.jar:lib/jpa2.jar:lib/hsqldb.jar:src "snv.RunTest"
Comment 1 Scott Van Wart CLA 2010-12-21 14:24:09 EST
Created attachment 185662 [details]
Sample test project (without dependency libraries)
Comment 2 Scott Van Wart CLA 2010-12-21 14:24:50 EST
Created attachment 185663 [details]
Log from running the sample project
Comment 3 Tom Ware CLA 2011-01-05 08:55:04 EST
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:10:08 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink