Hi,
The OperatorId.IN_SET let me create a Criterio where i can check if a fields value is in the array.
I need the 'opposite'.
I have a field with multiple true and want to get those who contains the search-value within their array-value.
the standard OperatorId.CONTAINS does not fullfil my needs because this could give too much results.
Example:
Record 1: colors: [red, green, light-red]
Record 2: colors: [light-red]
Criterion("colors", OperatorId.CONTAINS, "red")
would also return Record 2.
Is there a possibility to check if an array-value 'contains' one item which equals the serach-value.
The OperatorId.IN_SET let me create a Criterio where i can check if a fields value is in the array.
I need the 'opposite'.
I have a field with multiple true and want to get those who contains the search-value within their array-value.
the standard OperatorId.CONTAINS does not fullfil my needs because this could give too much results.
Example:
Record 1: colors: [red, green, light-red]
Record 2: colors: [light-red]
Criterion("colors", OperatorId.CONTAINS, "red")
would also return Record 2.
Is there a possibility to check if an array-value 'contains' one item which equals the serach-value.
Comment