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

Specify custom objectId when creating objects #392

Open
yinzara opened this issue Aug 7, 2024 · 1 comment
Open

Specify custom objectId when creating objects #392

yinzara opened this issue Aug 7, 2024 · 1 comment

Comments

@yinzara
Copy link

yinzara commented Aug 7, 2024

As implemented in Parse server:
parse-community/parse-server#6177
and in the Parse JS client:
parse-community/Parse-SDK-JS#1309

It is possible to create ParseObject(s) with a predefined ObjectId. This allows for use cases where Parse is not the system of record of the IDs of entities are defined in some external system.
This is done by calling the standard POST /classes/{className} API but specifying the "objectId" as a parameter of the object being submitted NOT by calling the PUT /classes/{className}/{objectId}

The Parse-SDK-dotNET does not allow this. If you specify an ObjectId on an object, it will attempt to use the PUT API and update the object failing to create the object.

The ParseJS SDK uses the presence of the "createdAt" property to know if it was ever retrieved instead of using the ObjectId to determine if PUT or POST should be used.

Copy link

Thanks for opening this issue!

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

No branches or pull requests

2 participants