0

Assume, If I have a two tables, let it be table 1 and table 2. I would like to save the object id of a data in table 1 to table 2. How to do this?. This is how I tried to get the object of the table 1 data with its object id.

Parse.Cloud.define("objWithId", function(request, response) {
  var Table1 = Parse.Object.extend("Table1");
  var query = Parse.Query(Table1);
  query.equalTo(id, request.params.dataId);
  query.find({
    success: function(results) {
      response.success(results);
    },
    error: function(error) {
      response.error(error);
    }
  });
});

But, I get the error as : TypeError: Cannot call method 'equalTo' of undefined

guru
  • 119
  • 1
  • 5

0 Answers0