mirror of
https://github.com/appwrite/appwrite
synced 2026-05-16 21:48:45 +00:00
remove: old attributes anyway.
This commit is contained in:
parent
d30fd56573
commit
e2202e9ffa
1 changed files with 7 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue