[AC-2640] $or operator doesn't properly work in ACS custom objects
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-01-17T07:18:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator CLI |
Labels | acs |
Reporter | farid fadaie |
Assignee | Ritu Agrawal |
Created | 2013-01-19T19:18:19.000+0000 |
Updated | 2016-03-08T07:41:44.000+0000 |
Description
You cannot really use $or in queries on custom objects.
Something like:
where = {
'$or' : [{
name : 'dbb'
}, {name : 'abc'}]
}
doesn't really return anything meaningful. Depending on what the query is, it sometimes returns the objects that match one of the conditions (and not the other one) and sometimes returns nothing (an empty array).
When you use any of the conditions individually, they work fine (not with $or).
"$or" is not a parameter according to our documentation. http://cloud.appcelerator.com/docs/api/v1/custom_objects/query
We have not been able to reproduce this issue with custom objects. It is also possible that this issue was fixed after it was reported. Here is the query that I used to verify that this functionality works fine.