codello / Motor-ODM

A MongoDB ODM based on Motor and Pydantic.
MIT License
17 stars 5 forks source link

Polymorphic Models #2

Open codello opened 4 years ago

codello commented 4 years ago

Mongo collections can contain documents of different shapes. Polymorphic models implement support for having multiple models in one collection. This comes with the following restrictions:

Polymorphic models and abstract models can be combined.