HHH-15359 The entity returned by a merge doesn't contain @ManyToMany relation when the collection resides in @Embeddable
This commit is contained in:
parent
13bae2ef09
commit
84c276b3cc
|
@ -168,7 +168,7 @@ public class TypeHelper {
|
||||||
Object[] targetComponentValues = target[i] == null
|
Object[] targetComponentValues = target[i] == null
|
||||||
? new Object[subtypes.length]
|
? new Object[subtypes.length]
|
||||||
: componentType.getPropertyValues( target[i], session );
|
: componentType.getPropertyValues( target[i], session );
|
||||||
replaceAssociations(
|
final Object[] objects = replaceAssociations(
|
||||||
origComponentValues,
|
origComponentValues,
|
||||||
targetComponentValues,
|
targetComponentValues,
|
||||||
subtypes,
|
subtypes,
|
||||||
|
@ -177,6 +177,9 @@ public class TypeHelper {
|
||||||
copyCache,
|
copyCache,
|
||||||
foreignKeyDirection
|
foreignKeyDirection
|
||||||
);
|
);
|
||||||
|
if ( target[i] != null && objects != null ) {
|
||||||
|
componentType.setPropertyValues( target[i], objects );
|
||||||
|
}
|
||||||
copied[i] = target[i];
|
copied[i] = target[i];
|
||||||
}
|
}
|
||||||
else if ( !types[i].isAssociationType() ) {
|
else if ( !types[i].isAssociationType() ) {
|
||||||
|
|
Loading…
Reference in New Issue