regarding my other thread reply, i'm currently get...
# spring
s
regarding my other thread reply, i'm currently getting a 'smart cast is impossible because xyz is a property that has an open or custom getter'. I am using the all-open plugin. is there a workaround for this? is it just a consequence of JPA, or something else? i mean, a workaround to still get smartcasts
s
The specific answer probably depends on the property. If it's something that doesn't need to be open, you can mark it explicitly final, or configure the plugin to not match that class/property. If it does need to be open, the normal workarounds for getting smartcasts apply, i.e. use
.let
or assign it to a local variable
s
well, all-open makes the whole class open. which is the same thing as saying that all of the properties are open, right? i'm forgetting why hibernate needs t hem open
k
afaik hibernate needs open class for proxying, data class cannot be open
💯 1
s
hm