exclude_none
parameter in session.save
#476
Oliversinn
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I know is very useful to save all of the fields in database because that makes each document to contain all the fields of the model. But something that I liked about Pydantic when I wasn't using ODMantic, is the fact that they have the option in
model_dump
to exclude all the fields that areNone
with the parameterexclude_none
. In my situation we are looking to have documents in database without fields set tonull
. It would be nice if I could have the option to do so with ODMantic as well.Beta Was this translation helpful? Give feedback.
All reactions