1
0
Fork 0
mirror of synced 2024-10-03 19:53:33 +13:00

Remove $collection and $internalId for nested documents

This commit is contained in:
Jake Barnby 2023-03-25 17:11:19 +13:00
parent 07c383e17a
commit 79c8ed3ce4
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -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;
}
}