Open wasabigeek opened 3 years ago
@dflourusso appreciate your comments!
Thanks for your contribution. I will review your code ASAP.
I don't know if the proposed solution is the best.
For example, should i apply the default values to update
too?
That's a good question, maybe we can think of it similarly to how column defaults are handled in sql databases? If I understood correctly, it will set defaults on update too, if the fields are empty.
Another question, in the update
method, i don't need to pass all model properties, then make sense not apply the defaultsvalues , what do you think?
To clarify, if we are updating a column A, it shouldn't set column B to it's default value, even if it's empty? I agree, it seems like that's the default SQLite behaviour is, which I think we should follow.
Fixes #33