Titanium JIRA Archive
Appcelerator Community (AC)

[AC-994] Order parameter does not work when querying ACS custom objects with coordinates

GitHub Issuen/a
Resolution Date2015-02-13T05:53:44.000+0000
Affected Version/sn/a
Fix Version/sn/a
ReporterAndrew Royce
AssigneeShuo Liang


*Whats happening*: Trying to retrieve a set of custom objects with coordinates ordered by "-updated_at". *What should be happening*: I should get the correct data set that is sorted most recently updated_at. *What I believe the problem is*: In ACS if there are coordinates supplied the order parameter gets ignored. *Temp fix*: If I remove the coordinates from the query I get the correct data and ordered correctly, the problem here is that I need the data to be within X miles of the user. {quote} Cloud.Objects.query({ classname : 'products', count : true, skip : _args.skip, limit : _args.limit, where : { "coordinates" : { "$nearSphere" : [_args.longitude, _args.latitude], "$maxDistance" : convertToRadians(_args.maxDistanceMiles) } }, order : "-updated_at" }, function(e) { if (e.success) { _args.success(e); } else { _args.failure(e); } }); {quote} On success i output the skip, limit, and ID of the first object. As you can see the ID is always the same even though I am changing the skip and limit. {quote} [INFO] : skip: 0 [INFO] : limit: 4 [INFO] : 54d19fa308c91ec27625e86d [INFO] : Marker Reached (Dynamic loading) [INFO] : skip: 4 [INFO] : limit: 4 [INFO] : 54d19fa308c91ec27625e86d [INFO] : Marker Reached (Dynamic loading) [INFO] : skip: 8 [INFO] : limit: 4 [INFO] : 54d19fa308c91ec27625e86d [INFO] : Marker Reached (Dynamic loading) [INFO] : skip: 12 [INFO] : limit: 4 [INFO] : 54d19fa308c91ec27625e86d {quote}


  1. Shuo Liang 2015-02-13

  2. Andrew Royce 2015-02-13

    Shuo, unfortunately I do not have the permissions to view the issue. Is there a rough timeframe of when 1.1.9 will be released? Is it possible to get permission to view the issue so I can keep an eye on it and when 1.1.9 gets released?

JSON Source