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
How would you know which Document to update? Just this one, the other, all of them? Beanie treats Document classes as their own separate Document instances in the DB, along with the collection they belong to.
Also I'm having trouble to understand which action would you like to be possible / what API. Could you give some usage examples, along with the expected outcome(s)?
You can use Pydantic models (that inherit from BaseModel) for the 'base classes'/models that you have, and then inherit from those for your Document's.
Describe the bug
Models that have more than 1 base class on top level are skipped during the initialization, so they cannot be used for any query.
To Reproduce
Error
Expected behavior
Document is saved as it happens when there is just a single base class
Additional context
Source of the problem:
beanie/odm/utils/init.py:
The text was updated successfully, but these errors were encountered: