[AC-994] Order parameter does not work when querying ACS custom objects with coordinates
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2015-02-13T05:53:44.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Andrew Royce |
Assignee | Shuo Liang |
Created | 2015-02-12T19:48:46.000+0000 |
Updated | 2016-03-08T07:37:19.000+0000 |
Description
*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}
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?