diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java index dae13ec74..d743c0a26 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMappingInfo.java @@ -24,6 +24,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -229,7 +230,7 @@ public class ClassMappingInfo if (cols == null) cols = Collections.EMPTY_LIST; if (_seconds == null) - _seconds = new HashMap(); + _seconds = new LinkedHashMap(); _seconds.put(tableName, cols); } diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/VersionMappingInfo.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/VersionMappingInfo.java index 6ace6e97f..daf3c3f4c 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/VersionMappingInfo.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/VersionMappingInfo.java @@ -20,8 +20,8 @@ package org.apache.openjpa.jdbc.meta; import java.util.ArrayList; import java.util.Arrays; -import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; @@ -71,7 +71,7 @@ public class VersionMappingInfo Table primaryTable = vers.getClassMapping().getTable(); List secondaryTableNames = Arrays.asList(vers .getClassMapping().getMappingInfo().getSecondaryTableNames()); - Map> assign = new HashMap>(); + Map> assign = new LinkedHashMap>(); for (Column col : templates) { String tableName = col.getTableName(); Table table;