Skip to content

Saving pointer saves whole object #6049

Closed
parse-community/parse-dashboard
#1291
@mtrezza

Description

@mtrezza

Issue Description

Saving a User pointer in an array saves the whole object.
Possibly related to #691.

Steps to reproduce

  1. Open Parse Dashboard.
  2. Add a class with a column of type array.
  3. Add a pointer value of an existing user to the array, e.g.
[{
    "__type": "Pointer",
    "className": "_User",
    "objectId": "EXISTING_OBJECT_ID"
}]
  1. Pointer is saved correctly (check directly in DB, not via parse dashboard)
  2. Click on refresh in parse dashboard data browser.
  3. Item in array is not displayed as Pointer but as Object containing all fields, e.g.
[{
    "__type": "Object",
    "className": "_User",
    "objectId": "EXISTING_OBJECT_ID",
     (+ all other fields of the object)
}]
  1. Pointer is still saved correctly in DB (check directly in DB, not via parse dashboard)
  2. Double click on array field in parse dashboard and exit editing mode
  3. Pointer has been replaced by Object in DB

Notes:

  • This does not happen right after starting the server. It seems that the user needs to be cached or something. For me it happens when I do it in a class that contains a relation field where the user is added and I first add the user to an array there. The issue then occurs in every other class as well. I haven't quite nailed down the pattern yet.

  • 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.

Expected Results

Pointer value should be added to array as is.

Actual Outcome

The whole object is added to the array.

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 3.4.4, 3.9.0
    • parse-dashboard version (Be specific! Don't say 'latest'.) : 2.0.2
    • Operating System: -
    • Hardware: -
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): -
  • Database

    • MongoDB version: 3.6.12
    • Storage engine: MongoDB
    • Hardware: -
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): -

Logs/Trace

(none)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions