Can one instantiate an Ormar model using the .construct() method? #317
-
In Pydantic, one can use the .construct() method to instantiate a model while skipping validation. I tried it out with an Ormar model and it seemed to work, except there were some random exceptions when I tried to .save() it that gave me the impression that perhaps doing this broke some of Ormar's internals. Does Ormar work with the .construct() method? Or is there an Ormar equivalent? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In theory you probably can but that won't populate relations... Somehow skipped those method in pydantic 😅🤷 |
Beta Was this translation helpful? Give feedback.
In theory you probably can but that won't populate relations...
Somehow skipped those method in pydantic 😅🤷
Skipping the validation can sure come in handy so can you please open an enhancement issue for this?