HHH-17621 UnsupportedOperationException when merging an entity with a @Any mapping
This commit is contained in:
parent
c6c2d578de
commit
de570da3b0
|
@ -191,6 +191,10 @@ public class TypeHelper {
|
|||
}
|
||||
else {
|
||||
final Type type = types[i];
|
||||
if ( type.isAssociationType() ) {
|
||||
copied[i] = types[i].replace( currentOriginal, target[i], session, owner, copyCache, foreignKeyDirection );
|
||||
}
|
||||
else {
|
||||
if ( type.isComponentType() ) {
|
||||
final CompositeType compositeType = (CompositeType) type;
|
||||
if ( target[i] != null ) {
|
||||
|
@ -205,14 +209,9 @@ public class TypeHelper {
|
|||
);
|
||||
target[i] = compositeType.replacePropertyValues( target[i], objects, session );
|
||||
}
|
||||
copied[i] = target[i];
|
||||
}
|
||||
else if ( !type.isAssociationType() ) {
|
||||
copied[i] = target[i];
|
||||
}
|
||||
else {
|
||||
copied[i] = types[i].replace( currentOriginal, target[i], session, owner, copyCache, foreignKeyDirection );
|
||||
}
|
||||
}
|
||||
}
|
||||
return copied;
|
||||
|
|
Loading…
Reference in New Issue