Closed
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest versions of Parse Server and the Parse JS SDK.
Issue Description
Hi!!
When using findAll()
to execute a query, the exclude
parameter is omited.
You can see here that include
and select
are copied from the local this
to query
, but exclude
is omited
Parse-SDK-JS/src/ParseQuery.js
Lines 951 to 953 in 549b7b3
Not sure if it's the expected behaviour, if so, it should be documented.
Patch here : sadortun@2ee3d53
Steps to reproduce
const q1 = Parse.Query('Player')
q1.include('team')
q1.exclude('team.logo')
q1.limit(999999)
const players = q1.find() // Fast, logo is excluded
const q2 = Parse.Query('Player')
q2.include('team')
q2.exclude('team.logo')
const players = q1.findAll() // Slow, logo is present
side note: q1.toJSON()
and q2.toJSON()
produce expected output
Actual Outcome
- q1 : Contains Teams, without logos
- q2: Contains teams WITH logos
Expected Outcome
- q1 : Contains Teams, without logos
- q2: Contains teams without logos
Environment
Server
- Parse Server version:
6.2.1
- Operating system:
windows 🤡
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
local
Database
- System (MongoDB or Postgres):
mongo
- Database version:
recent
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
local
Client
- Parse JS SDK version:
4.0.1