Grails/GORM “in” criteria

倾然丶 夕夏残阳落幕 提交于 2019-12-03 10:03:34

The Grails createCriteria documentation includes an example of using the in clause:

'in'("holderAge",[18..65]) 
or not{'in'("holderAge",[18..65])}

The documentation includes this note:

Note: 'in' is a groovy reserve word, so it must be escaped by quotes.

Yep, you have it almost exactly right. Just change in to 'in', since in is a keyword in groovy.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!