Closed oliviermilla closed 5 years ago
Hello @muichkine,
createNew
is an addition to the initial API, thus its different name.
Yes but the API seems different.
For instance. Model.create()
in Vuex can take a { data: { key: value }}
as an argument while createNew
seems not to.
For instance, when doing
DocumentPrice.createNew({
data: { DocDataId: 13 }
}).then((entities) => { console.log(entities); });
the console output shows a DocDataId set to null
which is puzzling me.
Now doing
DocumentPrice.create({
data: { DocDataId: 13 }
}).then((entities) => { console.log(entities); });
yields
Vuex-ORM differentiates Models
create
andinsert
.I would say it is wise to respect that convention in the plugin-change-flags API as far as API coherence is concerned.