-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Option allowCustomObjectId
forces all objects to have custom objectId
#1402
Labels
type:feature
New feature or improvement of existing feature
Comments
Thanks for opening this issue!
|
mtrezza
added
type:feature
New feature or improvement of existing feature
and removed
type:improvement
labels
Dec 6, 2021
The label |
parse-github-assistant
bot
removed
the
type:feature
New feature or improvement of existing feature
label
Dec 6, 2021
4 tasks
mtrezza
changed the title
allowCustomObjectId does force all objects to have custom objectId
Option Sep 4, 2022
allowCustomObjectId
does force all objects to have custom objectId
mtrezza
changed the title
Option
Option Sep 4, 2022
allowCustomObjectId
does force all objects to have custom objectId
allowCustomObjectId
forces all objects to have custom objectId
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
New Feature / Enhancement Checklist
Current Limitation
Currently it is not possible to have mixed environment of custom and server generated
objectId
withallowCustomObjectId = true
. At certain database schemes it is desired that some objects have theirobjectId
generated by server and some (mainly in other object class) would get a customobjectId
.Feature / Enhancement Description
allowCustomObjectId = true
thecreatedAt
is used to decide whether the object is being created or updated. So that developers know how the create/update is handledallowCustomObjectId = true
fore theobjectId
to not be nil, for example:Parse-SDK-JS/src/ParseObject.js
Line 2402 in d196e7f
Example Use Case
As an example - in my use case there is always one private
User
object and always one publicProfile
object. Having the ability to set customobjectId
toProfile
that is same as the relatedUser.objectId
would give a direct reference between these two objects, saving following load:User
andProfile
)Profile
orUser
object to find related partner (for example to set ACL when there is only profile'sobjectId
known)Alternatives / Workarounds
Currently used workaround is to use reference field in each linked objects, as mentioned above the
User.profileId
andProfile.userId
, but when user A is saving a new message to user B and A knows only B's profilesobjectId
, the cloud code has to fetch theProfile
object to be able to set ACL to the recipientUser.objectId
. With growing user base and larger message count this is not negligible overload3rd Party References
Additional observations
allowCustomObjectId
is a confusing name for that. I can confirm that - as a newcomer to Parse I understood that flag for a long time wrong, that I can use both, and learned the hard way the opposite. So either it should be renamed, or the SDKs updated (what I see as small change), plus added in the documentation that allowCustomObjectId will still generate objectId if it is not defined (together with mentioning that createdAt is needed when allowCustomObjectId if true.Unfortunately I am very bad in javaScript and would most probably do more harm than profit but with some guidance I can try. Although to run test cases I will certainly fail as I am newcomer knowing only swift and running Parse with back4app... The documentation I can cover!
The text was updated successfully, but these errors were encountered: