parse-community / parse-community/parse-server
Because relationship columns do not accept keysToReturn or excludeKeys
Open
Nobody has claimed this yet.
type:bug
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
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 version of Parse Server and the Parse Flutter SDK.
Issue Description
See that even specifying only
query.keysToReturn(['name']);
query.excludeKeys(['expertises']);
the response returns me the expertises column which is relational.
Steps to reproduce
any query
Actual Outcome
with expertises
Expected Outcome
without expertises
Environment
Parse Flutter SDK
- SDK version:
parse_server_sdk_flutter: ^4.0.0 - Flutter version:
3.7.7 - Dart version:
2.19.4 - Operating system version:
PopOS
Server
- Parse Server version:
5.2.3
Logs
I/flutter ( 5351): ╭-- Parse Request
I/flutter ( 5351): curl -X GET -H 'user-agent: Flutter Parse SDK 4.0.2' -H 'X-Parse-Application-Id: ' -H 'X-Parse-Session-Token: r:' -H 'X-Parse-Client-Key: ' https://parseapi.back4app.com/classes/Medical?where=%7B%22seller%22:%20%7B%22__type%22:%22Pointer%22,%22className%22:%22UserProfile%22,%22objectId%22:%22mwHolsSQ5U%22%7D,%22isDeleted%22:%20false%7D&keys=name&excludeKeys=expertises&order=-updatedAt&skip=0&limit=2&include=seller
I/flutter ( 5351):
I/flutter ( 5351): https://parseapi.back4app.com/classes/Medical?where={"seller": {"__type":"Pointer","className":"UserProfile","objectId":"mwHolsSQ5U"},"isDeleted": false}&keys=name&excludeKeys=expertises&order=-updatedAt&skip=0&limit=2&include=seller
I/flutter ( 5351): ╰--
I/flutter ( 5351): ╭-- Parse Response
I/flutter ( 5351): Class: Medical
I/flutter ( 5351): Function: ParseApiRQ.query
I/flutter ( 5351): Status Code: 200
I/flutter ( 5351): Payload: [{"className":"Medical","objectId":"rOs5XoBa3o","createdAt":"2023-04-07T18:41:39.636Z","updatedAt":"2023-04-08T09:17:59.390Z","name":"def","expertises":{"__type":"Relation","className":"Expertise","objects":null}}, {"className":"Medical","objectId":"p5qwOVx2Ue","createdAt":"2023-04-06T09:16:06.559Z","updatedAt":"2023-04-08T09:17:48.076Z","name":"abc","expertises":{"__type":"Relation","className":"Expertise","objects":null}}]
I/flutter ( 5351): ╰--
I/flutter ( 5351): name: true
I/flutter ( 5351): crm: false
I/flutter ( 5351): expertises: true
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Parse Server query shown in the issue with keys=name and excludeKeys=expertises, then inspect how relationship fields are handled in the query response. Done means the response omits the expertises relation while preserving the requested fields and existing query behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100