Javascript - Error: 102 bad type for inQuery Parse.com -
when run code in cloud bad inner query error when should matching results. objectid's of objects have match?
here code:
parse.cloud.define("itemsinfo", function(request, response) { var testitems = parse.object.extend("testitem"); var userfavorites = parse.object.extend("userfavourite"); var testitemsquery = new parse.query(testitems); var userfavoritesquery = new parse.query(userfavorites); var installationquery = new parse.query(parse.installation); testitemsquery.exists('item'); testitemsquery.equalto('school', 'union college (ny)'); userfavoritesquery.include('item'); //this makes sure pull of favorite item data instead of pointer object userfavoritesquery.matchesquery("item", testitemsquery); //this run second query against testitems //userfavoritesquery.limit(1000); //limit results 1000 //userfavoritesquery.ascending('userid'); //group user id's in array userfavoritesquery.find({ success: function(results) { console.log(results); }, error: function(error) { alert("error: " + error.code + " " + error.message); } });
would try this? tell query compare item object rather objectid. if doesn't work, let me know.
userfavoritesquery.matcheskeyinquery('item', 'objectid', testitemsquery);
Comments
Post a Comment