Why Is Incorrect Data Being Returned From Query Runs?
Using Parse.com and JavaScript SDK. http://www.kudosoo.com/friendslist.html Using the code here http://jsfiddle.net/Dano007/LJ8rn/ (just for ref, it wont run). I'm expecting this t
Solution 1:
This does not make sense:
var query = new Parse.Query(myBadges);
new Parse.Query("myBadges").matchesQuery("uploadedBy", new Parse.Query("_User").equalTo("username", friendName));
First you are creating a query for "myBadges", assigning it to the variable "query". Then you are creating another query, also for "myBadges". This new query is not assigned anywhere.
The query that you are running the "find" operation on is the one that you have assigned to the query variable.
If you are expecting the second line, to have any influence on the first, then that is likely the source of your error.
Try this:
var query = newParse.Query(myBadges);
query.matchesQuery("uploadedBy", newParse.Query("_User").equalTo("username", friendName));
query.find({
success: function (rules) {
Post a Comment for "Why Is Incorrect Data Being Returned From Query Runs?"