Skip to content

SaveAll + BeforeSave Cloud duplicate check = Not Saving All #2396

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
kitkat14 opened this issue Jul 26, 2016 · 1 comment
Closed

SaveAll + BeforeSave Cloud duplicate check = Not Saving All #2396

kitkat14 opened this issue Jul 26, 2016 · 1 comment

Comments

@kitkat14
Copy link

This issue is really easy to recreate and explain. It doesn't even need a template :)

Parse never had a way to create unique columns. So they only way to make sure there are no duplicates is use the beforeSave hook to check if the object already exists. If it already exists return response.error if not response.success.

This works great if you independently save an object. But when you use saveAll this fails
It tries to save all but when one is a duplicate it will throw back a error ofcourse because of the beforeSave hook and the method skips the rest of the objects...

Is there no way around this ? or do we then just have to use save each object independently ? Doesnt this use more connections ?

@hramos
Copy link
Contributor

hramos commented Aug 1, 2016

This appears to be a usage question and not an issue with Parse Server. I am closing this out as we're trying to cut down on the number of non-issues here on GitHub.

You may use Server Fault for questions about managing Parse Server.

For code-level and/or implementation-related questions or technical support, please refer to Stack Overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants