I have custom objects that I am trying to retrieve 2 at a time and display the most recently updated first. The problem is when I set "order=updated_at" or "order=-updated_at" it both pulls the oldest records from a few days ago when I have some as recent as 30 minutes ago. Here is the current ACS query:
var where = { "coordinates" : { "$nearSphere" : [_args.longitude, _args.latitude], "$maxDistance" : convertToRadians(_args.maxDistanceMiles) } }; Cloud.Objects.query({ classname : 'products', count : true, skip : _args.skip, //0 limit : _args.limit, //2 order : "-updated_at", where : where }, function(e) { if (e.success) { _args.success(e); } else { _args.failure(e); } });
I would think by setting the limit to 2 and trying both ascending and descending that it would change the reresults, but either way I still get the oldest products.