grails-views
grails-views copied to clipboard
Provide a way to include transient properties when rendering json with the JSON API.
Currently, only persistent properties are rendered.
Just as a use case, this issue is the result of conflation between the concept of database persistence vs. object persistence (which seems to happen a lot in spots).
I have a model which has some data stored persistently in the database, and other data which is loaded from elsewhere (all done in a service). In GORM-speak, the non-database properties are transient (ie: static transient = ['propertyName']
) however they are not object transient (ie: transient PropertyType propertyName
) and they do need to be serialized (and thus output when JSONifying).