HHH-16457 Values returned in ValueAccess.getValues() and getValue(…) not alphabetical for Java records

This commit is contained in:
Andrea Boriero 2023-04-19 14:09:16 +02:00
parent 6a9ff46f63
commit 80b32fcd35
1 changed files with 3 additions and 0 deletions

View File

@ -772,6 +772,9 @@ public class Component extends SimpleValue implements MetaAttributable, Sortable
private boolean isSimpleRecord() {
// A simple record is given, when the properties match the order of the record component names
final Class<?> componentClass = resolveComponentClass();
if ( customInstantiator != null ) {
return false;
}
if ( componentClass == null || !ReflectHelper.isRecord( componentClass ) ) {
return false;
}