Grails request not listed

I am writing criteria to make a request, but I cannot figure out how to deny the inList criteria ... Is there a way to do something like:

def result = c { not inList('id', ids) } 

thanks

+6
source share
1 answer

Your criteria should like ...

 def ids = [1, 2, 3]; def c = Foo.createCriteria(); def results = c.list { not {'in'("id",ids)} } 

The documentation can be found here . I believe this was just added in grails 2. +

+15
source

Source: https://habr.com/ru/post/914714/


All Articles