Skip to content

Custom ValueConverter does not bind to hasMany collection properly #11235

@joemccall86

Description

@joemccall86

Task List

  • Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem uploaded to Github
  • Full description of the issue provided (see below)

Steps to Reproduce

  1. Register a custom ValueConverter in resources.groovy
  2. Include hasMany = [attachments: Attachment] in a domain class.
  3. Attempt to bind a value using data binding to collections convention (e.g., attachments[0]=<foo>)

Expected Behaviour

The collection is created utilizing the custom converter.

Actual Behaviour

The collection is not bound.

Environment Information

  • Operating System: Fedora 29 Workstation
  • Grails Version: 3.2.13, 3.3.9
  • JDK Version: openjdk version "1.8.0_191"
  • Container Version (If Applicable): N/A

Example Application

https://github.com/joemccall86/data-converter-binding

The master branch is Grails 3.2.13, and the grails_339 branch is Grails 3.3.9. Integration test is included (using the Micronaut HTTP client, and a picture of my cat!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions