我面臨的一個問題,從這個封閉得到所需要的結果我現在面臨與個createCriteria
def authors{
results = Message.createCriteria().list {
projections {
author{
groupProperty('id', 'authorId') // 2nd param is alias
property('username', 'username')
}
}
and{
...
...
}
}
[authors:results]
}
我想表明我 GSP頁面上這份名單,並希望通過訪問值別名 (當上述標準被返回數組列表)
提示所有投影必須有別名。我瘋了,爲什麼我得到空值。 –