Hi,
you're right. Your use case (quite common) is not covered by current SQL operators. We need a CONTAINSKEY and CONTAINSVALUE that match complex conditions like CONTAINS does but against keys and values of maps.
From the other side CONTAINS now accepts a condition between () to match against the collection items. But today if you've a collection of string you can't do:
SELECT FROM Profile WHERE tags CONTAINS 'Luca'
but you have to do:
SELECT FROM Profile WHERE tags IN 'Luca'
that it could be fine, but in many case the user expects that CONTAINS means "contains" and if doesn't contain sub-records it should go like the IN operator...
Could you open an issue for this?
In the meanwhile I suggest you to use a List and CONTAINS operator.
Lvc@