Hi,
I am trying to write a custom GET api on a model like so:
Hotel.forWeb = function (externalId, cb) {
this.find({where: {city: {$ne: null}}, order: 'createdAt DESC'}, function (err, hotels) {
cb(null, hotels);
});
};
This is not executing the correct non null query in mongo. From the mongo profile collection:
"query" : {
"$query" : {
"city" : "[object Object]"
},
"orderby" : {
"createdAt" : -1
}
},
Can someone point to what am I doing wrong?
Thanks,
Puneet