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
The mongoengine documentation states that EmbeddedDocuments support being the primary_key, which is true, but this breaks if you try to create a ReferenceField pointing to such a document. Consider the following:
The mongoengine documentation states that EmbeddedDocuments support being the
primary_key
, which is true, but this breaks if you try to create aReferenceField
pointing to such a document. Consider the following:This raises an
InvalidDocument
exception during dereferencing. Pymongo uses theid
of the dbref directly in a query:The relevant call in mongoengine is Line 1178 in fields.py
I think this could be universally fixed with
Unless
dbref.id
is not always a field, in which case atry..except
should workThe text was updated successfully, but these errors were encountered: