The groovy way to see if something is in a list is to use \"in\"
if(\'b\' in [\'a\',\'b\',\'c\'])
However how do you nicely see if something
According to Grails documentation about creating criteria here, you can use something like this:
not {'in'("age",[18..65])}
In this example, you have a property named "age"
and you want to get rows that are NOT between 18 and 65. Of course, the [18..65]
part can be substituted with any list of values or range you need.