Skip to content

Commit 667f1ee

Browse files
committed
HHH-18829 Hibernate Processor - use LinkedHashMap instead of HashMap into preserve order of record components in generated ID class
1 parent a332dd7 commit 667f1ee

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
@@ -55,6 +55,7 @@
5555
import java.util.ArrayList;
5656
import java.util.Collection;
5757
import java.util.HashMap;
58+
import java.util.LinkedHashMap;
5859
import java.util.List;
5960
import java.util.Map;
6061
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)