I am in the process of debugging issues of upgrading our app to Grails 5 from 3. This little bit of code was throwing an error that it could not be converted when it should have been able to.
if (item.product.instanceOf(Tissue)) {
Tissue product = (Tissue) item.product
}
after reading other post i fixed the error by Hibernate.unproxy(item.product) and it works as expected. What changed during the upgrade to cause me to have to do this? Is there some configuration I can apply to revert the behavior back.
Looks like this was a design choice by the Grails team - https://github.com/grails/grails-data-mapping/issues/1468