Retrieve Parser.com data of type pointer

-1

I have the table in the Parser database, which is called Comment.

Within it I have the comment field and a field called a pointer of type "pointer" that points to the objectId of another table that is called Image. So, I need to show all the comments that are related to this photo. I'm doing it this way:

ParseQuery query = ParseQuery.getQuery ("Comment");

query.whereEqualTo ("pointer", obID);

query.findInBackground (new FindCallback () {

What am I doing wrong? It shows nothing!

    
asked by anonymous 02.06.2018 / 22:04

1 answer

0

I have decided as follows:

ParseQuery query = ParseQuery.getQuery ("Comment");         query.whereEqualTo ("pointer", obID);         query.findInBackground (new FindCallback () {

        public void done(List<ParseObject> commentList, ParseException e) {

            if (e == null) {//lista com sucesso

               // for (ParseObject object: commentList) {

                 //   Log.i("ListarDados", "Comentario:  " + object.get("comentario"));
                //}
                Log.i("ListarDados"," Sucesso ao listar comentarios"+ commentList.size());


            } else { // lista sem sucesso

                Log.i("ListarDados"," Erro ao listar comentarios"+ e.getMessage());

            }

        }
    });

The error was in how I was saving in the database!

    
05.06.2018 / 02:38