No results found error in Parse

308 views Asked by At

I am using Parse in my android application. My aim is to retrieve all the names of quizTitle in my Class CSE_1234 for which the status is "no". But I am getting ParseException: No results found Here is my code:

ParseQuery<ParseObject> query = ParseQuery,getQuery("CSE_1234");
query.whereEqualTo("status","no");
query.get("quizTitle");
List<ParseObject> activeQuizTitle=query.find();
String title[]=(String[]) activeQuizTitle.toArray();
return title
2

There are 2 answers

4
Rene Xu On

couple things are wrong in your codes

  • remove query.get(), this is supposed to load the object by Id
  • you cannot cast List to String[]
  • do a for loop and ParseObject.getString("title");
0
medic_ma On
ParseQuery<ParseObject> query = ParseQuery,getQuery("CSE_1234");

This should be:

ParseQuery<ParseObject> query = ParseQuery.getQuery("CSE_1234");

you have a comma (,) where there should be a period (.) between ParseQuery and getQuery