Grails域类字符串属性不区分大小写的搜索

Grails域类字符串属性不区分大小写的搜索,grails,groovy,Grails,Groovy,我正在尝试使用我的服务在我的数据库中查找记录,该操作有效: def resultList = IndividualRecord.findAllWhere(citizenship: 'us') 但当我将公民身份改为大写时,就像这样: def resultList = IndividualRecord.findAllWhere(citizenship: 'US') 它不再起作用了。所以我试了一下: def resultList = IndividualRecord.findAllWhere(ci

我正在尝试使用我的服务在我的数据库中查找记录,该操作有效:

def resultList = IndividualRecord.findAllWhere(citizenship: 'us')
但当我将公民身份改为大写时,就像这样:

def resultList = IndividualRecord.findAllWhere(citizenship: 'US')
它不再起作用了。所以我试了一下:

def resultList = IndividualRecord.findAllWhere(citizenship.caseIgnoreEquals('us'))

但这不起作用。有什么建议吗?公民身份是类
个人记录的
字符串
属性

这将不敏感地将
公民身份
字段与
'US'
案例匹配

def resultList = IndividualRecord.findAllByCitizenshipIlike('US')

这是否意味着“公民身份就像”?另外,如果我想添加个人记录的“唯一身份”是“23”的标准呢。所以,我想要一个唯一身份证是23的美国公民。这两个查询是否都可以在同一个查询中?@AnonymousHuman是的,动态查找程序允许您组合多个谓词,就像def resultList=IndividualRecord.findAllByCitizenshipIlike('US',uniqueId:23)?
def resultList=IndividualRecord.findAllByCitizenshipIlikeAndUniqueId('US',23)