Skip to content

Is limiting relationships possible? #58

Description

@adammsteele

Hi,

Just trying to get my head around what is and isn't supported, the use case I'm after would be something like an Author with many Books, and writing a spec to show the author and the top 5 books by some ordering criteria.

I tried a couple of approaches to no avail:

  • I wrote a slice pair which used QuerySet.__getitem__ to mimic slicing, but I think that won't work in general if there are other filters to be applied to the overall queryset
  • An annotation using row_number also did not work because one cannot filter on a window function

Let me know if you would prefer questions to be asked on a different platform.

Thanks for the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions