[AC-2712] ACS Places query cannot use "$gt" on updated_at field.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2013-08-30T17:41:53.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | acs, bug |
Reporter | Yuji ODA |
Assignee | Wei Kong |
Created | 2013-08-28T00:29:38.000+0000 |
Updated | 2016-03-08T07:41:49.000+0000 |
Description
My application is working few days ago.
But it does not work today.
I use $gt on updated_at, see below.
Cloud.Places.query({
limit: 1,
where: {
user_id: "XXXXXXXXXX",
thread_id: { "$exists" : false },
closed: { "$exists" : false },
updated_at: { "$gt": moment().subtract("minutes", 30).toDate() }
},
order: '-created_at'
},
function (e) {
alert(e);
});
The console output, below.
ACS Request: { url: "places/query.json", verb: "GET", data: {"limit":1,"where":{"user_id":"XXXXXXXXXX","thread_id":{"$exists":false},"closed":{"$exists":false},"updated_at":{"$gt":"2013-08-27T23:37:11.262Z"}},"order":"-created_at"} })
API returns 200 but result is empty. Not found records.
When I removed updated_at condition, there are records.My condition is correct.
I am very troubled that it is not available.
(Maybe this problem is related TC-2837 and TC-2836.)
Please fix.
Best regards,
What is the actual value of the timestamp? In our documentation we only support 2013-08-21T04:54:22+0000 or 2013-08-21T04:54:22-0000 Can you please confirm the format of your timestamp? you can also get it from acs admin console log
The updated_at field value is auto generated by ACS. The actual value example is below. (on ACS admin console) > 2013-08-28T00:54:27+0000 Thank you.
can you please email me your app key and actual query that failed? wkong@appcelerator.com
Hi Yuji, Apologies for any inconvenience caused, it should be working now, it would be great if you could post here to clarify. Thanks!