Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333039 - @ElementCollection with @MapKeyJoinColumn and @Embeddable as value not persisting in correct order
Summary: @ElementCollection with @MapKeyJoinColumn and @Embeddable as value not persis...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-21 14:22 EST by Scott Van Wart CLA
Modified: 2022-06-09 10:10 EDT (History)
1 user (show)

See Also:


Attachments
Sample test project (without dependency libraries) (2.50 KB, application/octet-stream)
2010-12-21 14:24 EST, Scott Van Wart CLA
no flags Details
Log from running the sample project (22.77 KB, text/plain)
2010-12-21 14:24 EST, Scott Van Wart CLA
no flags Details

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