Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectFieldAccessor should support collections [SPR-12206] #16820

Closed
spring-issuemaster opened this issue Sep 17, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Sep 17, 2014

Artyom Dmitriev opened SPR-12206 and commented

I encountered the issue while trying to use DirectFieldAccessor along with JSR-303 Validation. Say, we have class Bar:

public class Bar {
    @NotNull
    private String value;
}

This code would work fine:

public class Foo {
    @Valid
    @NotNull
    private Bar bar;
}

whereas the code below would not work and I would get " java.lang.IllegalStateException: JSR-303 validated property 'bars[0].value' does not have a corresponding accessor for Spring data binding...":

public class Foo {
    @Valid
    @NotNull
    private List<Bar> bars;
}

Affects: 4.1 GA

Issue Links:

  • #17402 Make initDirectFieldAccess work with array, List and Map

Referenced from: commits 3d86f15

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented May 21, 2015

Stéphane Nicoll commented

This is now supported. Array and Map support has been added as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.