Add support for top-level indexes/unique constraints on polymorphic fields

XMLWordPrintableJSON

    • Python Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • 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.

            Assignee:
            Tim Graham
            Reporter:
            Tim Graham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: