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
A workaround for issue #75, the `parent_resource` was converted to the **Link** type, which is manually populated using create_link() method. Since Beanie cannot/struggles to fetch links of multiple types, two new class methods were added: get_parent_resource() uses link reference to find and return parent document(Workspace/Group/Poll), and get_policy_holder() finds and returns document of policy holder(Account/Group).
the parent_resource was converted to the Link type, which is manually populated using create_link() method. Since Beanie cannot/struggles to fetch links of multiple types, two new class methods were added: get_parent_resource() uses Link reference to find and return parent document(Workspace/Group/Poll), and get_policy_holder() finds and returns document of policy holder(Account/Group).
It is impossible to use multiple types with Beanie
BackLink
, as a result, the document stores the whole linked document. For example:When creating new Policy, the
parent_resource
field stores the whole Workspace/Group document instead, which is undesirable.The underlying issue has been mentioned in BeanieODM/beanie#746
The text was updated successfully, but these errors were encountered: