Replies: 1 comment 2 replies
-
Thanks again 😄 .... you are finding good points. Should have done that before v1. The reason for having this that way, is no reaason ^^....it's still legacy from the vuex-orm-next code base.
Dunno....well if i look at the code i know. This is legacy code.
you are right i need here more silver lining. Although your example doesn't need query(). From my point of few i dont want to have repository all query functions, because it adds only not necessary code to the bundle. since most functions in repo are just shortcuts not to use
well....yes....but right now update only works with query chain builder. So from that perspetive it makes sense not haveing it in repository.
well all() should never be the same like get()....otherwise i dont need |
Beta Was this translation helpful? Give feedback.
-
Hi! First off thanks for your great work :)
I find the naming of the repository functions somewhat confusing. Or maybe not the naming, but what they do.
Could you share the reasoning behind the current way, especially with regards to the following:
What I would expect:
insert -> insert a new instance, including all relations. Throw an error if the id already exists.
update -> update an existing instance, including replacing relations. throws an error if entity does not exist
save -> insert or update depending on whether Id exists
Would it be an option to bring this more in line with the corresponding vuex-orm package, which im migrating away from?
Beta Was this translation helpful? Give feedback.
All reactions