Skip to content

Parse Array of Pointers Saving Differently #691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kevinwritescode opened this issue Feb 26, 2016 · 5 comments
Closed

Parse Array of Pointers Saving Differently #691

kevinwritescode opened this issue Feb 26, 2016 · 5 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@kevinwritescode
Copy link

We have not migrated and are still using a combination of development and production databases on Parse. We have an array of pointers column on our _User class. It used to be that calling Parse.addUnique("students", StudentObj); would save a reference pointer to the students but now the server seems to be populating the array with the full objects of each "student" _User class.

Additionally, this is causing a series of problems because calling "include" on _User for the students array of pointers is now simply returning an assorted array with some rows only having an ObjectID and some having a full (but out of date) object. What happened to the proper reference pointer logic?

@gfosco gfosco added the type:bug Impaired feature or lacking behavior that is likely assumed label Mar 1, 2016
@nlutsenko
Copy link
Contributor

Are you guys using beforeSave by any chance?

@nlutsenko
Copy link
Contributor

Also, could you add more details on how you are communicating with the server.
Are you using any SDK, if yes - which platform?

Also, would be amazing if you could provide the version of your Parse Server.

@kevinwritescode
Copy link
Author

We do not use beforeSave. We use the JS SDK (1.5.0) and the iOS SDK (I'll get that version info tomorrow). We have not migrated yet so we are not using the open source Parse Server yet. This seems to exclusively affect the _User class with columns that are arrays of pointers. The same addUnique() technique is being used on other classes we have with arrays of pointers, and they save a reference pointer object as expected. The _User class seems to be auto filling in the objects, even if I pass a stubbed object with just the _id.

@nlutsenko
Copy link
Contributor

Do you see the behavior being triggered from JS or iOS?
This sound super strange and since you are not using a Parse Server - I would recommend opening an issue on the relevant repo instead, but we can continue here.

@gfosco
Copy link
Contributor

gfosco commented Mar 7, 2016

Seconding what Nikita said, if this is not parse-server related, please open an issue on the relevant SDK repo or report a bug through http://parse.com/help

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

3 participants