From e2202e9ffa8a9fdbffd93257e251b28d2c25ff2d Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 5 May 2025 14:05:24 +0530 Subject: [PATCH] remove: old attributes anyway. --- src/Appwrite/Utopia/Response/Model/Table.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Model/Table.php b/src/Appwrite/Utopia/Response/Model/Table.php index e36cb1dabd..1855f471b1 100644 --- a/src/Appwrite/Utopia/Response/Model/Table.php +++ b/src/Appwrite/Utopia/Response/Model/Table.php @@ -118,17 +118,18 @@ class Table extends Model $columns = $this->remapNestedRelatedCollections($columns); } - $document - ->setAttribute('columns', $columns) - ->removeAttribute('attributes'); + $document->setAttribute('columns', $columns); $related = $document->getAttribute('relatedCollection'); if ($related !== null) { - $document - ->setAttribute('relatedTable', $related) - ->removeAttribute('relatedCollection'); + $document->setAttribute('relatedTable', $related); } + // remove anyways as they are already copied above. + $document + ->removeAttribute('attributes') + ->removeAttribute('relatedCollection'); + return $document; }