grails / grails-data-mapping

GORM - Groovy Object Mapping
http://gorm.grails.org/
218 stars 198 forks source link

Add proxy unwrapping back #1830

Closed jdaugherty closed 3 weeks ago

jdaugherty commented 1 month ago

As a follow-up to https://github.com/grails/grails-data-mapping/issues/1468, we are evaluating whether to add automatic proxy unwrapping back to Grails 7 to facilitate an easier upgrade from prior Grails Versions that are out of support.

jdaugherty commented 3 weeks ago

Investigated the history of proxy unwrapping: the last time GORM unwrapped was during Grails 2.x. The change was made in the Grails 3.x release. The largest reason it was removed appears to have been done for performance reasons. Several historical conversations exist on this topic, such as: https://groups.google.com/g/grails-dev-discuss/c/e3hgPM6Pwo8 .

The bean proxyHandler exists to facilitate easier unwrapping.