-
-
Notifications
You must be signed in to change notification settings - Fork 596
Allow field name with underscore prefix in Parse.Object.set
#2474
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
Comments
Thanks for opening this issue!
|
Parse.Object.set
Parse.Object.set
Parse.Object.set
Parse.Object.set
Parse.Object.set
Parse.Object.set
I think we should remove the field name check from the SDK. Other SDK's like PHP and iOS don't have this check. They let the server handle it. Using the REST API would make this check useless. Also there isn't a check for class names the server handles that too. I believe this check was in place because the SDK didn't support dot notation at the time. If dot notation was allowed and not supported the SDK internals would be messed up. Dot notation is now fully supported. You can view the conversation here on why this check was needed. |
Shouldn't this regex allow for underscore already? Looks like the server doesn't support it either. In the case of fields like Parse-SDK-JS/src/ParseObject.ts Lines 1101 to 1103 in 1ad52b1
|
@mtrezza nvm it doesn't allow underscore at the start |
Yes, the regex requires a letter at the start. |
🎉 This change has been released in version 6.1.0-alpha.1 |
🎉 This change has been released in version 6.1.0 |
New Feature / Enhancement Checklist
Current Limitation
Currently, an error is thrown when setting a field name with underscore prefix in
Parse.Object.set
. Historically that made sense as these are Parse Server-internal fields. However, with the introduction of access scopes, internal fields can be read from and written to.Feature / Enhancement Description
The Parse JS SDK should allow sending internal fields to Parse Server, which will then handle the request accordingly. This may not only be relevant for
Parse.Object.set
but also forParse.Query
conditions on internal fields.Example Use Case
Alternatives / Workarounds
Make a REST API request to avoid the Parse JS SDK restriction.
The text was updated successfully, but these errors were encountered: