Skip to content

Ability to discover/create indexes from child classes via parent. #27

Description

@amcgregor

Given the following test case:

from marrow.mongo import Document, Index
from marrow.mongo.field import String

class Base(Document):
    foo = String()
    _foo = Index('foo')

class Sub(Base):
    bar = String()
    _bar = Index('bar')

Indexes provided by this class and all subclasses should be made available as an attribute, and calls to create_collection or create_indexes should accept an additional argument (defaulting to True) to create subclass indexes in addition to the primary class indexes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.enhancementNew ideas or improvements.area:indexIssues relating to index declaration or construction.org:help-wantedThese issues may make for good entry points into working on the codebase.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions