Parse Server - select a few fields from included object

1.5k Views Asked by At

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?

1

There are 1 best solutions below

1
On BEST ANSWER

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

const aQuery = new Parse.Query('A');
aQuery.include('pointerToB');
aQuery.select('pointerToB.someFieldOfB');