transient properties in Grails4

57 views
Skip to first unread message

Joud

unread,
Apr 25, 2019, 11:15:08 AM4/25/19
to Grails Dev Discuss
Hi all,

Since "DefaultGrailsDomainClass" & "GrailsDomainClassProperty" are removed in Grails4 and replaced by the PersistentEntity & PersistenProperty, the transient properties are not retrieved with the persistentProperties and has to be retrieved separately. 
This can be done directly on the domain class like
domainClassName.transients
or with
grails.util.GrailsClassUtils.getStaticPropertyValue(domainClass,'transients')

but the problem is that belongsTo in the domain class is returned as transient as well, like if I have static belongsTo = [contact:Contact] in my domain class, I get contactId among the transients! Which is causing problems when getting the properties types.

Anyone knows how to exclude the belongsTo from the returned transients if this is even possible?

Thanks in advance
Reply all
Reply to author
Forward
0 new messages