我正在使用Grails 3.2.2和org.grails.plugins:views-gradle:1.1.1,在我的gson部分中,我想扩展所有用户及其内容。我试过了:
import com.example.sections.Section
model {
Section section
}
json g.render(section, [excludes:['archived', 'deleted'], expand:['clients', 'clients.carnets']]){
}
但它只扩展了结果json中的客户端。我怎样才能做到这一点? 客户端域类中的btw carnets是瞬态的。是否可以将瞬态变量添加到结果gson中?如果是这样 - 怎么样?