pydantic-odm
pydantic-odm copied to clipboard
Small async ODM for MongoDB based in Motor and Pydantic library
Fix #23 `exclude={'id'}` was only added when updating a document, now I added to creating as well. PS. maybe setting "exclude_none" to true can be another solution?
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...
Implementation of NestedDBMixin or EmbededDBMixin for save nested pydantic models to mongo (like as EmbededDocument from MongoEngine). - [ ] EmbededDocument as separate class - [ ] Unpacking EmbededDocument to...
Right now, if you want to store reference to another document, you should create something like this: ``` class Foo(DBPydanticMixin): names: List[str] class Config: database = 'default' collection = 'foo'...