Skip to content

mongoengine have XXX.objects.first(). Why there are no last()? #1749

@rscarrera27

Description

@rscarrera27

When we use mongoengine and want to get last item, most of us use as this example.

Users.objects.order_by('-id').first()

I want to use last(), instead of above example. because I think first and last must be paired.

The following code is what I want.

Users.objects.last()

Thank you for your effort, contributors. 👍

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