BeanieODM/beanie

[BUG] `original_field` is not supported by pydantic, makes typecheckers give a type error and causes a warning at runtime

ldorigo opened this issue · 4 comments

Not much to add - e.g.:

class Foo(Document):
   bar: Link[Bar]


class Bar(Document):
  foos: list[BackLink[Foo]] = Field(original_field="bar")

original_field should be declared in the json_schema_extra dictionary in pydantic v2 models. The documentation has not been updated. You can refer to this issue #885 (comment)

This issue is stale because it has been open 30 days with no activity.

Not stale, fix the docs :)

This issue is stale because it has been open 30 days with no activity.