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

View File

@ -207,7 +207,7 @@ else if ( types[i].isComponentType() ) {
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];