-
-
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
Add dot notation to get/set Parse.Object
attributes
#1313
Comments
closing for now as this is probably better suited to StackOverflow / the forum |
use getters and setters;
|
Thanks for opening this issue! |
Parse.Object
attributes
This would cause backwards compatibility issues if this feature is enable by default. If some users are using the ParseObject to store extra temporary info, the get/set intercept temporary user data. |
I think this has been discussed in #1484 and been accepted as a caveat that would go into the docs. Setting a custom property on a foreign-managed object is always at risk of breaking and probably not good practice, because Parse.Object could get a new property in the future that conflicts with the custom property. And adding a new property would not be considered a breaking change. |
If someone else is interested, we've used decorators on custom parse objects to add get/set notation on the properties we want saved: decorator:
example:
|
Hello, if anyone is interested I open sourced my solution for providing types and dot notation for custom database classes. |
Is your feature request related to a problem? Please describe.
VueJS is pretty heavy on binding data using dot notation. This makes things pretty difficult when using Parse, as to get properties you need to use
.get(key)
and.set(key)
.This means that you have to constantly convert your data to and from JSON and Parse Objects.
Describe the solution you'd like
Be able to use dot notation for
.get(key)
and.set(key)
. This would mean, for example, you could bind an input to obj.toJSON().name<input v-model="obj.toJSON().name" placeholder="edit me">
, without having to have a function to pass it to another JSON object.Describe alternatives you've considered
Subclassing using Proxy, but doesn't work with vueJS
Additional context
The text was updated successfully, but these errors were encountered: