transient properties in Grails4

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

transient properties in Grails4

Joud Kassem
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

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/33806e4d-aba3-4f9a-b0a4-ce1c932fbcff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.