HHH-15554 Merge of an Entity with an immutable composite user type throws NPE

This commit is contained in:
Andrea Boriero 2022-10-03 17:21:46 +02:00 committed by Andrea Boriero
parent 89bd029bce
commit fe1ff7a829
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ public class TypeHelper {
copyCache,
foreignKeyDirection
);
if ( target[i] != null && objects != null ) {
if ( componentType.isMutable() && target[i] != null && objects != null ) {
componentType.setPropertyValues( target[i], objects );
}
copied[i] = target[i];