Skip to content

Commit

Permalink
[bug] fix embeddable support when used with file (ie xml) mapping (#271)
Browse files Browse the repository at this point in the history
The annotaion/attribute drivers do not register embeddables in
class metadata but the file drivers do.
  • Loading branch information
kbond authored Apr 22, 2022
1 parent 40a5a1e commit ff9e4ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,13 @@ private function isPersisting(): bool
return false;
}

if ($classMetadata instanceof ORMClassMetadata && $classMetadata->isEmbeddedClass) {
// embedded entity
return false;
}

if ($classMetadata instanceof ODMClassMetadata && $classMetadata->isEmbeddedDocument) {
// embedded document
return false;
}

Expand Down

0 comments on commit ff9e4ef

Please sign in to comment.