Skip to content

NumberToDomainInstanceEditor does not handle hibernate proxies #14

@gpothier

Description

@gpothier

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions