Skip to content
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

SaveAll on new objects does not return objectIds #502

Closed
4 tasks done
dplewis opened this issue Apr 28, 2023 · 2 comments · Fixed by #503 or parse-community/parse-server#8520
Closed
4 tasks done

SaveAll on new objects does not return objectIds #502

dplewis opened this issue Apr 28, 2023 · 2 comments · Fixed by #503 or parse-community/parse-server#8520
Labels

Comments

@dplewis
Copy link
Member

dplewis commented Apr 28, 2023

New Issue Checklist

Issue Description

When setting liveQuery.classNames in the server config save all doesn't return object Id when saving more than one new objects. I assume that some sort of afterSave trigger is called that strips away the objectId. I've tested this against Parse Server 6. ObjectIds are returned when you saveAll on one object.

Since objectIds aren't returned you can't delete / save etc.

I believe the issue can be found by looking https://github.com/parse-community/parse-server/blob/alpha/src/RestWrite.js#L1607

Steps to reproduce

Actual Outcome

Objects save but objectId is missing

Expected Outcome

Objects save and return Id.

Parse PHP SDK

  • SDK version: 2.0.0
  • PHP version: 8.1

Server

  • Parse Server version: 6.0.0
  • Operating system: Mac
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Local

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 4.4
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local

Logs

@parse-github-assistant
Copy link

parse-github-assistant bot commented Apr 28, 2023

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

dplewis added a commit to dplewis/parse-php-sdk that referenced this issue Apr 28, 2023
@dplewis
Copy link
Member Author

dplewis commented Apr 28, 2023

I created a Faliing test for this #503

I can't seem to replicate this on the JS SDK though.

@dplewis dplewis changed the title SaveAll on new objects don't return objectId SaveAll on new objects does not return objectIds Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants