Saving a User pointer in an array saves the whole object.
Possibly related to https://github.com/parse-community/parse-server/issues/691.
[{
"__type": "Pointer",
"className": "_User",
"objectId": "EXISTING_OBJECT_ID"
}]
Pointer but as Object containing all fields, e.g.[{
"__type": "Object",
"className": "_User",
"objectId": "EXISTING_OBJECT_ID",
(+ all other fields of the object)
}]
Pointer has been replaced by Object in DBNotes:
The class where it occurs has no beforeSave / afterSave hook.
This actually seems to be a Parse Dashboard issue rather than a Parse Server issue.
Pointer value should be added to array as is.
The whole object is added to the array.
Server
Database
(none)
It is probably a bug in the Parse Dashboard. It seems like a corner case of this bug that was recently addressed: https://github.com/parse-community/parse-dashboard/pull/1223
I will take a look on this.
This PR should fix it: https://github.com/parse-community/parse-dashboard/pull/1291
I have found just one issue.
When editing the following array, its value is rendered correctly on parse-dashboard but the changes aren't persisted. When you hit the refresh button, "foo" attribute disappears.
[
{
"__type": "Pointer",
"className": "_User",
"objectId": "fRnZ0N8667",
"foo": "bar"
}
]
@douglasmuraoka thanks for reporting. It should not save the attribute. So I pushed one more commit to the PR in which we do not show invalid pointers anymore after commiting a change. Can you please take a look again?