Skip to content

Commit 799616c

Browse files
committed
HHH-18829 Hibernate Processor - use LinkedHashMap instead of HashMap into preserve order of record components in generated ID class
1 parent 9f1020a commit 799616c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMetaEntity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import java.util.ArrayList;
5454
import java.util.Collection;
5555
import java.util.HashMap;
56+
import java.util.LinkedHashMap;
5657
import java.util.List;
5758
import java.util.Map;
5859
import java.util.Set;
@@ -167,7 +168,7 @@ public AnnotationMetaEntity(
167168
this.element = element;
168169
this.context = context;
169170
this.managed = managed;
170-
this.members = new HashMap<>();
171+
this.members = new LinkedHashMap<>(); // Order should be preserved!
171172
this.quarkusInjection = context.isQuarkusInjection();
172173
this.importContext = new ImportContextImpl( getPackageName( context, element ) );
173174
jakartaDataStaticModel = jakartaDataStaticMetamodel;

0 commit comments

Comments
 (0)