2

Is it possible to use .select(JS) / selectKeys(Android) ONLY on the object which is retrieved via .include()?

For example, Class A has a pointer to class B. When I query for Class A, I want all the contents of Class A and only a few selected fields of Class B. Is it possible?

Tom Fox
  • 897
  • 3
  • 14
  • 34
Tanzim Chowdhury
  • 3,020
  • 2
  • 9
  • 21

1 Answers1

6

Yes. That's possible. You can do something like this:

const aQuery = new Parse.Query('A');
aQuery.include('pointerToB');
aQuery.select('pointerToB.someFieldOfB');
Davi Macêdo
  • 2,954
  • 1
  • 8
  • 11
  • Yes that work's, I also realized I will have to select all the other fields of "A" that I want or else they get omitted. Thank you . – Tanzim Chowdhury Apr 08 '20 at 17:37