Why Lucid method create doesn't TS check for payload completeness #3978
-
I'm creating a migration script from old db to an adonis connected db. When I do my SomeModel.create({...}) i don't get any warnings if the given payload is incomplete. I was about to override the definition of BaseModel create method from this:
to something like this:
why isn't this a default behavior for the create api? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If my incomplete you mean the values are missing, then it is perfectly okay to not define all the attributes in a save call.
|
Beta Was this translation helpful? Give feedback.
If my incomplete you mean the values are missing, then it is perfectly okay to not define all the attributes in a save call.