Remove $collection and $internalId for nested documents

This commit is contained in:
Jake Barnby committed 2023-03-25 17:11:19 +13:00
1 parent 07c383e17a
commit 79c8ed3ce4
1 file changed
+6
@@ -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;
}
}