假设我有这样的代码:
def c = Account.createCriteria()
def results = c {
between("balance", 500, 1000)
eq("branch", "London")
or {
like("holderFirstName", "Fred%")
like("holderFirstName", "Barney%")
}
maxResults(10)
order("holderLastName", "desc")
}
我想使用 lower() 函数将数据转换为小写
def c = Account.createCriteria()
def results = c {
between("balance", 500, 1000)
eq("branch", "London")
or {
like("lower(holderFirstName)", "Fred%")
like("lower(holderFirstName)", "Barney%")
}
maxResults(10)
order("holderLastName", "desc")
}
我的代码不起作用。什么是正确的语法?我对变音符号有疑问,所以我不想使用ilike