-
-
Notifications
You must be signed in to change notification settings - Fork 11
Inserting Data With Default Values #57
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
Correct. This method appears to be missing. Docs need updating! Thanks for spotting this. |
@cuebit you haven't told me what should i use to do the same though. is there a way ? |
@Zenthae It might not be suitable solution but you must at least give 1 default field value. Like Or should we create a record if users pass in an empty object 🤔 ? |
@cuebit Yap it should! But, just wondering if it might make sense to actually create a new record when passing in empty object Either way I think having |
True. But then there has to be the |
Ah very good point. Yeah lets go with |
any news on this ? |
Should have a PR by the end of the week 👍 |
👋 |
Uh oh!
There was an error while loading. Please reload this page.
https://next.vuex-orm.org/guide/repository/inserting-data.html#inserting-data-with-default-values
that's what's written on the doc, but the
new()
method doesn't exist in practice ? so how i'm supposed to add data ?this.$store.$repo(User).insert(new User());
? that's what i'm using at the moment, but i'm not sure if it's the right way to do itThe text was updated successfully, but these errors were encountered: