简体   繁体   中英

No results found error in Parse

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

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");
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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM