0

I have a Place object, containing an array with objectIds for Tag objects. An example of an array:

[[{"__type":"Pointer","className":"FavoriteTag","objectId":"Toc5sVlzVd"},{"__type":"Pointer","className":"FavoriteTag","objectId":"cUxcl0IFFv"}]]

My first workflow way too slow:

  1. query each Place object, get the array and parse it to find each objectId
  2. get the corresponding Place with the objectId

The workflow I'm trying:

  1. Find the objectId of each matching Tag object
  2. Put these objectIds in a ArrayList
  3. Get each Place object that contains a matching objectId from the arraylist

I don't know how to do step 3. I'm trying:

parseQueryFavoritePlaces.whereEqualTo("tags", arrayListTagsObjectIds);

and

parseQueryFavoritePlaces.whereContainedIn("tags", arrayListTagsObjectIds);

but no luck so far. Am I on the right track here?

1 Answer 1

1

Try giving this a shot: query.whereContainedIn(String key, Collection<? extends Object> values)

According to the Parse documentation this adds a constraint to the query that requires a particular key's value to be contained in the provided list of values.

Here's the ParseQuery documentation if you think that might be useful!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.