-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: django
-
None
Context
EmbeddedModelField – Django-MongoDB abstraction to represent an embedded document in the Django ORM. Requires each subfield is typed.
PolymorphicEmbeddedModelField – Django-MongoDB abstraction to represent an embedded document in the Django ORM. It that can store multiple types of embedded documents. Each embedded document is represented by a Django MongoDB Backend model class. Each subfield is typed.
INTPYTHON-698 added EmbeddedFieldIndex and EmbeddedFieldUniqueConstraint for use on subfields of EmbeddedModelField and EmbeddedModelArrayField.
Support should also be added for subfields of PolymorphicEmbeddedModelField and PolymorphicEmbeddedModelArrayField.
Definition of done
Code, tests, docs added based on this template: https://github.com/mongodb/django-mongodb-backend/commit/fefbaa1e61967d4b32b1d4995663841d352f31b9
Pitfalls
The subfields must of the same type in order to create an index/constraint.