You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that saving the models also creates an empty id in both the _doc attribute for DBPydanticMixin instance and the MongoDB collection. Also, if you call the dict() method on the model, this field will be included in the result. This is especially noticeable with nested models. But just comparing 2 models - everything will be fine.
Included decoders to BasePydanticMixin
Implemented decoding MongoDB documents before update mixin model
Removed unused method, functions and properties from mixins and tests
Fix#23
I noticed that saving the models also creates an empty
id
in both the_doc
attribute forDBPydanticMixin
instance and the MongoDB collection. Also, if you call thedict()
method on the model, this field will be included in the result. This is especially noticeable with nested models. But just comparing 2 models - everything will be fine.This is not entirely good.
Mini-prof from test breakpoint
Environment:
Python - 3.8
motor - 2.1.0
pymongo - 3.10.1
pydantic - 1.6.1
pydantic-odm - 0.2
The text was updated successfully, but these errors were encountered: