Java Filter (Android) with Parsequery field type Pointer

Asked

Viewed 16 times

0

How I would make this query, being that this field (product) is of the pointer type, which references another table (group)?

ParseQuery<ParseObject> queryProdutos = ParseQuery.getQuery("products");
queryProdutos.whereEqualTo("group", "a431g152aa1" );
queryProdutos.findInBackground((objectGroup, e1) -> {
    for (ParseObject group: objectGroup) {
        Log.i("main", "return === " + group.getString("nome"));
    }
});

In Nodejs I managed to solve doing so:

.equalTo("group", { __type: 'Pointer', className: 'groups', objectId: "xxxxx" })

But in Java (Android) I can’t do it that way, I tried that way too:

queryProdutos.whereEqualTo("evento", new ParseObject("eventos").get(ParamsDao.getEventoId()));

1 answer

-1

resolved. Solved!

queryGrrupos = ParseQuery.getQuery("products");
queryGrrupos.whereEqualTo("group", ParseObject.createWithoutData("groups", ParamsDao.getEventoId()));

Browser other questions tagged

You are not signed in. Login or sign up in order to post.