For a query like this:
SELECT * WHERE activities CONTAINS 'bicycle-hire'
On a BAAS endpoint with an "activities" element like this:
activities: ["bicycle-hire","bicycle-hire-onsite"]
I get zero results returned.
If the query is modified to:
SELECT * WHERE activities CONTAINS 'bicycle'
I get results which might be expected as each element does contain that string.
"CONTAINS" documentation here:
http://apigee.com/docs/app-services/content/working-queries.
Does anyone know of a solution or work-around to this issue?... I need to match on the full strings shown in the above array.
Thanks.
Answer by sudheendras
·
May 29, 2015 at 10:36 AM
Try -
select * where activities = 'bicycle-hire*'
However I am not sure why contains does not work in this case..
That does appear to work, even without the wildcard (*) although I'm not sure why as activities is an array. I thought CONTAINS was / is the "correct" way to query the content of an array?
How can i filter users via uuid? 1 Answer
Select fields in BaaS query 1 Answer
Unable to select property names with capital letters? -1 Answers