I have a relatively standard Parse query to obtain the nearest items in the 'checkIn' class to an object's location as follows:
var checkInObject = Parse.Object.extend('checkIn');
var query = new Parse.Query(checkInObject);
query.near('location', request.object.get('location'));
query.limit(Parse.User.current().get('limit'));
This works as expected, however can return checkins of the user carrying out the request. To avoid this I add in an additional constraint so my code now looks like this:
var checkInObject = Parse.Object.extend('checkIn');
var query = new Parse.Query(checkInObject);
query.near('location', request.object.get('location'));
query.notEqualTo('user', Parse.User.current());
query.limit(Parse.User.current().get('limit'));
But with this addition I no longer receive any results from the query. How can I add the constraint and still obtain the required results?