PL-8769 Collection OneToMany are merged incorrectly by EntityManager

This commit is contained in:
Andrey Subbotin 2017-03-09 13:34:15 +04:00
parent af208df864
commit 3443f3c0fc

View File

@ -327,7 +327,10 @@ public class EntityManagerImpl implements EntityManager {
continue;
}
if (srcProperty.getRange().isClass() && metadataTools.isOwningSide(srcProperty)) {
if (srcProperty.getRange().isClass() & !metadataTools.isEmbedded(srcProperty)) {
if (!metadataTools.isOwningSide(srcProperty))
continue;
Class refClass = srcProperty.getRange().asClass().getJavaClass();
if (!metadataTools.isPersistent(refClass))
continue;