grails-json-rest-api
grails-json-rest-api copied to clipboard
NumberToDomainInstanceEditor does not handle hibernate proxies
trafficstars
Sometimes the objects obtained from the database are not of the actual domain class but rather of a synthetic subclass (an hibernate proxy, see eg. http://jira.grails.org/browse/GRAILS-4614)
NumberToDomainInstanceEditor checks if a value is from the expected class by doing this: value.class == domainClass which fails if value is a proxy.
It should be domainClass.isAssignableFrom(value.class)
Hi, now that the fix has been merged, would it be possible to generate a new version of the plugin?