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 committed by Andrea Boriero
parent 6e4b5cc0a0
commit 9b85afc88c
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;
}