Skip to content

Commit ff9e4ef

Browse files
authored
[bug] fix embeddable support when used with file (ie xml) mapping (#271)
The annotaion/attribute drivers do not register embeddables in class metadata but the file drivers do.
1 parent 40a5a1e commit ff9e4ef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Factory.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,13 @@ private function isPersisting(): bool
449449
return false;
450450
}
451451

452+
if ($classMetadata instanceof ORMClassMetadata && $classMetadata->isEmbeddedClass) {
453+
// embedded entity
454+
return false;
455+
}
456+
452457
if ($classMetadata instanceof ODMClassMetadata && $classMetadata->isEmbeddedDocument) {
458+
// embedded document
453459
return false;
454460
}
455461

0 commit comments

Comments
 (0)