Skip to content

update() function disregards limit() #1612

Open
@Sriharivignesh

Description

@Sriharivignesh

Lets say I have a 10 documents of Item in the database.

Lets retrieve 3 documents of Item matching some condition using limit().

documents = Item.objects(somefield=somecondition).limit(3)

Now if I do

documents.update(), mongoengine updates all the documents in the database matched by the query not just the 3 documents I have limited my query to.

Hope this gets fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions