【发布时间】:2016-08-22 09:04:09
【问题描述】:
我需要在带有 grails 条件查询的列表中添加附加值
class A{
String name
String address
}
def list=A.createCriteria.list{
projections{
property("name","name");
property("additionalPropertyValue;","additionalProperty");
// this value does not exist in domain class, but I need in list
}
}
Result should have additionalPropertyValue
【问题讨论】:
-
你能解释更多吗?那是什么财产,它来自哪里?你到底想要什么?
-
是的,我想要自定义属性和名称,并且该属性的值由其他函数返回,例如:我也需要大写的名称值,所以我想添加属性"大写",其值为 name.toUpperCase();