Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Count does not work with masterKey on postgres #8286

Open
4 tasks done
dblythy opened this issue Nov 3, 2022 · 1 comment
Open
4 tasks done

Count does not work with masterKey on postgres #8286

dblythy opened this issue Nov 3, 2022 · 1 comment
Labels
bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@dblythy
Copy link
Member

dblythy commented Nov 3, 2022

New Issue Checklist

Issue Description

Using query.count({useMasterKey: true}) returns 0 objects.

Steps to reproduce

it('count objects', async () => {
    const obj = new Parse.Object('TestObject');
    const obj2 = new Parse.Object('TestObject');
    await Parse.Object.saveAll([obj, obj2]);
    const query = new Parse.Query('TestObject');
    const count = await query.count({ useMasterKey: true });
    equal(count, 2); // this fails, count is 0.
  });

Actual Outcome

Count is 0

Expected Outcome

Count should return.

Environment

Server

  • Parse Server version: 5.3.0
  • Operating system: macos
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): localhsot

Database

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

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): js
  • SDK version: -

Logs

@parse-github-assistant
Copy link

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza mtrezza added type:bug Impaired feature or lacking behavior that is likely assumed bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) labels Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants