Skip to content

Using limit() in count queries is ignored #8811

Open
@hej2010

Description

@hej2010

New Issue Checklist

Issue Description

Using .limit(X) in a count() query is ignored.

Steps to reproduce

Run a query with .limit(X) on a collection.

Actual Outcome

The count result is the number of rows matching the query, which can be greater than the specified limit.

Expected Outcome

The count is the smallest of the number of rows and the X in .limit(X).

Environment

Server

  • Parse Server version: 6.5.0-beta.1
  • Operating system: Ubuntu 22
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 5.3.2
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions