Closed spring-projects-issues closed 9 years ago
Juergen Hoeller commented
This seems to refer to a general limitation with Spring's direct field access: It doesn't come with support for nested properties. We rather 'insist' on accessor methods for such a scenario; we intend to revisit this for 4.1.
For the time being, since you have accessor methods anyway, have you tried regular bean property binding? That should work fine in your scenario.
Juergen
Benjamin M commented
+1 !!!
I am waiting for this since decades!
(Mainly because I just want to use public fields within my DTOs)
Maciej Walkowiak commented
I submitted a pull request that fixes this issue by adding nested fields traversing feature for DirectFieldAccessor
: https://github.com/spring-projects/spring-framework/pull/543
Stéphane Nicoll commented
Work on #14339 fixed this issue. Your test case runs fine with the latest 4.1.0.BUILD-SNAPSHOT
chris marx commented
For those of us still on 3.2+, how exactly are we supposed to configure the LocalValidatorFactoryBean such that it does not use direct field access?
Vladimir Kralik opened SPR-10623 and commented
When I use org.springframework.validation.Validator, the IllegalStateException is thrown.
The javax.validation.Validator works correctly.
Look at attached JUnit-test ( also as an maven project in attachement ).
Affects: 3.2.3
Attachments:
Issue Links:
14339 org.springframework.beans.DirectFieldAccessor fails to go through field paths recursively
Referenced from: commits https://github.com/spring-projects/spring-framework/commit/bc714888c4f0b970792e29f1e3e7bb8682d60cb4
1 votes, 6 watchers