Reputation: 5665
I'm getting a NullPointer here, obviously because my query is not well formed. I was under the impression I could query for a Pointer column in my Class by just providing an object that matches it. Why doesn't the current user suffice?
ParseUser currentUser = ParseUser.getCurrentUser();
ParseQuery<ParseObject> requestsQuery = ParseQuery.getQuery("Request");
requestsQuery.whereEqualTo("author", currentUser);
requestsQuery.findInBackground(new FindCallback<ParseObject>() {
@Override
public void done(List<ParseObject> requestList, ParseException e) {
if (e == null) {
log.info(requestList.toString());
}
}
});
NullPointer:
[WARNING]
java.lang.NullPointerException
at com.nnit.automation.controller.IndexController$1.done(IndexController.java:58)
at org.parse4j.ParseQuery$FindInBackgroundThread.run(ParseQuery.java:623)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Upvotes: 0
Views: 186