问题
I'm using Grails 3.2.2 and org.grails.plugins:views-gradle:1.1.1 and in my section gson I'd like to expand all users and their carnets. I tried:
import com.example.sections.Section
model {
Section section
}
json g.render(section, [excludes:['archived', 'deleted'], expand:['clients', 'clients.carnets']]){
}
but it only expands clients in result json. how can I do that? btw carnets in Client domain class are transient. Is it possible to add transient variables to result gson? If so - how?
来源:https://stackoverflow.com/questions/40441814/second-level-expand-in-gson