我難倒和一點點的幫助,將不勝感激..Groovy中,Grails的問題與鏈接關閉
1)本工程
def critQuery = Vlan.createCriteria()
def criteria = criteriaUtil.aproxFilterClosure.curry(Vlan, params)
vlanList = critQuery(criteria)
2)這工作太
def critQuery = Vlan.createCriteria()
def criteria = {eq('dot1qId', 121.toLong())}
def ordering = {order('name','asc')}
def query = criteria << ordering
vlanList = critQuery(query)
3 )但這不起作用
def critQuery = Vlan.createCriteria()
def criteria = criteriaUtil.aproxFilterClosure.curry(Vlan, params)
def ordering = {order('name','asc')}
def query = criteria << ordering
vlanList = critQuery(query)
ERRORMSG:法無簽名:ch.ethz.id.netcenter.common.util.CriteriaUtil $ _closure1.doCall()是適用於參數類型:(java.lang.Class中..
class CriteriaUtil {
..
def aproxFilterClosure = {myClass, map ->
...
}
..
}
會是什麼成爲鏈接兩個關閉標準和排序的正確方法?
您可以在使用[命名查詢](http://grails.org/doc/latest/ref/Domain%20Classes/namedQueries.html)後實現目標嗎? –
您似乎在文章中缺少某些錯誤消息。 –