Skip to content

Retrieve all column from pointer #615

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
gcostaapps opened this issue Apr 29, 2021 · 3 comments
Closed

Retrieve all column from pointer #615

gcostaapps opened this issue Apr 29, 2021 · 3 comments

Comments

@gcostaapps
Copy link
Contributor

Hi, I'm querying an object and retrieving the pointer's informationg with the object but I receive only the objectId from the pointer class.

I'm querying through

QueryBuilder(ParseObject('Card'))
      ..whereEqualTo('notebookId', notebookId)
      ..includeObject(['Tag'])

This query gives me all the information about the Card class and the objectId from the Tag that belongs to this Card.

It would be great if all the information from the Tag were available, so it wouldn't need to do another query to retrieve the Tag from each Card.

Is there a way to do it?

@fischerscode
Copy link
Contributor

Did you try to access the data inside "Tag" or did you print() the object?
In case you did print() the object, it is most likely the query did work as expected and the 'problem' is caused by the implementation of the .toString() method. As it just prints the data of the first object layer. See this comment (and issue) for further information.

@gcostaapps
Copy link
Contributor Author

gcostaapps commented Apr 29, 2021

In my case it seems the response objectData only comes wit the objectId and className. (I'm on the nullsafety branch)

This is the response:

tag problem

I'm trying to get the tags as the code below. I can get the tagObject but not the name of the tag because the object only has objectId

if (response.count > 0) {
      return response.results!.map((e) {
        final tagObject = e.get<ParseObject>('tagPointer');
        var tagName = tagObject.get('name');
        //return Card.fromJson(e.toString());
      }).toList();
    }

EDIT: Using LiveQuery through ParseLiveList the Tag comes with all columns

@RodrigoSMarques
Copy link
Contributor

Closed. No activity in the last 14 days.
If necessary open again.

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

3 participants