this is a very strange problem, which is to use the keyword transient in the entity class to modify the attribute, which is not displayed when as JSON.
as JSON
doesn"t output these attributes. What"s going on?
this is a very strange problem, which is to use the keyword transient in the entity class to modify the attribute, which is not displayed when as JSON.
as JSON
doesn"t output these attributes. What"s going on?
as json serializes entity objects. Adding transient means that this property does not allow serialization. There should be no
you didn't assign a value, did you? Also, you don't need a field like transients at all, you can use:
domain.list().collect {
[
id: it?.id,
name: it?.xxx
]
}
whatever you want to encapsulate in this