diff --git a/src/Appwrite/Utopia/Response/Model/Document.php b/src/Appwrite/Utopia/Response/Model/Document.php index e1d393587c..ea21c89668 100644 --- a/src/Appwrite/Utopia/Response/Model/Document.php +++ b/src/Appwrite/Utopia/Response/Model/Document.php @@ -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; } }