Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330237 - Tables are created in unspecified order (DDL creation)
Summary: Tables are created in unspecified order (DDL creation)
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: submitted_patch
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-15 07:40 EST by Sei Syvalta CLA
Modified: 2022-06-09 10:34 EDT (History)
4 users (show)

See Also:


Attachments
Simple patch to fix the problem (2.29 KB, patch)
2010-11-15 07:48 EST, Sei Syvalta CLA
peter.krogh: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sei Syvalta CLA 2010-11-15 07:40:11 EST
Build Identifier: svn trunk (2.2.0), r8499

If you create DDL multiple times it results in different order for the create statements every time. This makes it very difficult to track what has actually changed.

Reproducible: Always

Steps to Reproduce:
1. Create DDL
2. Copy it to another name
2. Create DDL again
3. diff the backup copy and the new version to see the changed order
Comment 1 Sei Syvalta CLA 2010-11-15 07:48:09 EST
Created attachment 183118 [details]
Simple patch to fix the problem

A quick patch to fix the problem. I think the most important change is to call getOrderedDescriptors and change tableMap to an ordered map. I'm not sure if rest of the HashMap --> LinkedHashMap changes are really needed (I would guess they are but didn't analyze that far).
Comment 2 Tom Ware CLA 2010-11-19 14:12:00 EST
Checked into Trunk

Tested Manually and with JPA LRG and DDL Generation tests

Reviewed by: Tom Ware - reviewed user submitted patch
Comment 3 Peter Krogh CLA 2010-12-08 14:30:40 EST
moving ipLog flag to patch
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:34:16 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink