【发布时间】:2013-02-20 15:37:53
【问题描述】:
我有这样的方法
static getList (long colorid) {
ColorShades.findAll 'from ColorShades where color.id = :colorid', [colorid: colorid]
}
我是这样使用的:
def shadeIdsForAColor = ColorShades.getList(colorid as long)
问题
该方法返回一个ArrayList 的ColorShade 对象,每个对象都有一个shadeId。
如何将这些 id 作为整数列表放入 shadeIdsForAColor 变量中?
【问题讨论】:
标签: grails groovy grails-orm