Skip to content

Subclassing of QuerySet #2010

@alexhuangc

Description

@alexhuangc

Is there any plans for allowing developers to easily subclass querysets like in django? Currently, it seems like any subclass of a queryset returns the queryset, not the subclass.

Example:
class CustomQuerySet(QuerySet):
def get_active():

CustomQuerySet.filter().get_active()

The above is not chainable since .filter() returns an instance of QuerySet not CustomQuerySet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions