Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to retrieve a record from parse.com without knowing the objectId

See the sample code below - in this case, the objectId for the record I am trying to retrieve is known.

My question is, if I don't know the Parse.com objectId, how would I implement the code below?

var Artwork = Parse.Object.extend("Artwork");
var query = new Parse.Query(Artwork);
query.get(objectId, {
  success: function(artwork) {
    // The object was retrieved successfully.
    // do something with it
  },
  error: function(object, error) {
    // The object was not retrieved successfully.
    // warn the user
  }
});
like image 962
vedran Avatar asked Oct 17 '12 11:10

vedran


1 Answers

Query.get() is used when you already know the Parse object id. Otherwise, one can use query.find() to get objects based on the query parameters.

like image 67
pareshgoel Avatar answered Nov 04 '22 09:11

pareshgoel