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 save method to the model #150

Closed
kiaking opened this Issue Apr 30, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@kiaking
Copy link
Member

kiaking commented Apr 30, 2018

From Vuex ORM 0.25.0, it is now possible to do things like User.create() or user.$update(). However, those method are pretty much just an alias of store methods. To be able to do things bit more like active record implementation, I think it's nice to have save method where model field value gets saved to the Vuex Store.

const user = new User()

user.name = 'John Doe'

user.$save()

@kiaking kiaking added the enhancement label Apr 30, 2018

@clockworked247

This comment has been minimized.

Copy link

clockworked247 commented May 7, 2018

+1 to this @kiaking I actually implemented this myself in all my Models. It'd be nice to have this baked into the library. Thanks!

@kiaking

This comment has been minimized.

Copy link
Member Author

kiaking commented May 8, 2018

Oh Yeah! Thanks for the feedback! Will be implementing it soon : )

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