Reputation: 5495
What query.getFirst() really returns?
Retrieves at most one ParseObject that satisfies this query. Uses the network and/or the cache, depending on the cache policy. This mutates the ParseQuery. Returns: A ParseObject obeying the conditions set in this query, or null if none found. Throws: ParseException - Throws a ParseException if no object is found.
First is saying that returns null of the object is not found. After that it says that there will be an exception of object not found..
What it really does?
Thanks.
Upvotes: 2
Views: 1053
Reputation: 5020
Method throws ParseException
, tested on Parse-1.7.1 SDK
e = {com.parse.ParseException@831697061768}"com.parse.ParseException: no results found for query"
code = 101
cause = {com.parse.ParseException@831697061768}"com.parse.ParseException: no results found for query"
detailMessage = {java.lang.String@831697061808}"no results found for query"
stackState = {int[266]@831697061912}
stackTrace = {java.lang.StackTraceElement[0]@831693444272}
suppressedExceptions = {java.util.Collections$EmptyList@831693442224} size = 0
Upvotes: 2