Skip to content

Relational Query Include Objects #365

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

Closed
ChineOnw opened this issue Apr 29, 2020 · 1 comment
Closed

Relational Query Include Objects #365

ChineOnw opened this issue Apr 29, 2020 · 1 comment

Comments

@ChineOnw
Copy link

Hey everybody,

when will it be available to include related objects within one query. As it is metioned on the REST documentation here: REST-API

In some situations, you want to return multiple types of related objects in one query. You can do this by passing the field to include in the include parameter. For example, let’s say you are retrieving the last ten comments, and you want to retrieve their related posts at the same time:

@RodrigoSMarques
Copy link
Contributor

Hi @ChineOnw

I verified that it is not in the documentation, but the option exists.
Use the * includeObject * operator

      final QueryBuilder queryBuilder =
          QueryBuilder<ParseObject>(ParseObject('product'))
            ..orderByAscending('name');
      queryBuilder.includeObject(['category']);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants