Remove $collection and $internalId for nested documents
This commit is contained in:
parent
07c383e17a
commit
79c8ed3ce4
1 changed files with 6 additions and 0 deletions
|
@ -74,6 +74,12 @@ class Document extends Any
|
|||
$document->removeAttribute('$internalId');
|
||||
$document->removeAttribute('$collection'); // $collection is the internal collection ID
|
||||
|
||||
foreach ($document->getAttributes() as $attribute) {
|
||||
if ($attribute instanceof DatabaseDocument) {
|
||||
$this->filter($attribute);
|
||||
}
|
||||
}
|
||||
|
||||
return $document;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue