chrisala opened a new issue, #16675:
URL: https://github.com/apache/grails-core/issues/16675

   ### Issue description
   
   As discussed in #16290 #16280 #16281, the change to select bean properties 
over Map entries in Groovy 5 can result in Exceptions being thrown when 
binding/encoding/decoding unstructured Map data to GORM for MongoDB entities.
   
   The example I have encountered is a domain object which stores GeoJSON data 
in a Map typed property.  The GeoJSON Feature type has an attribute named 
"properties" which is being shadowed by the Groovy meta properties field.
   
   I've created a sample project 
[here](https://github.com/chrisala/gorm-mongodb-grails8/) that attempts to 
reproduce the issue.
   
   Changing the following to use Map API get/put instead of the groovy 
subscript operator seems to resolve the issue for my test case.
   
   
https://github.com/apache/grails-core/blob/bd0c1394ce9ffe42045f565774d6a4739ea7e3d0/grails-data-mongodb/bson/src/main/groovy/org/grails/datastore/bson/codecs/CodecExtensions.groovy#L226
   
   
https://github.com/apache/grails-core/blob/bd0c1394ce9ffe42045f565774d6a4739ea7e3d0/grails-data-mongodb/bson/src/main/groovy/org/grails/datastore/bson/codecs/CodecExtensions.groovy#L297
   
   
https://github.com/apache/grails-core/blob/bd0c1394ce9ffe42045f565774d6a4739ea7e3d0/grails-web-databinding/src/main/groovy/grails/web/databinding/GrailsWebDataBinder.groovy#L590
   
   
    


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to