File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,7 @@ dependencies {
1717Here is an example of a command object that uses the plugin:
1818
1919``` groovy
20- @Validateable
21- class PhoneNumber {
20+ class PhoneNumber implements Validateable {
2221 long id
2322 String countryCode
2423 String areaCode
@@ -33,8 +32,7 @@ Here is an example of a command object that uses the plugin:
3332 telephoneType(cascade: true)
3433 }
3534
36- @Validateable
37- static class TelephoneType {
35+ static class TelephoneType implements Validateable {
3836 String id
3937 boolean countryCodeRecommended
4038
@@ -56,6 +54,13 @@ When running a unit test, the cascade constraint isn't registered with Grails. T
5654` org.grails.testing.GrailsUnitTest ` and the following code must be added to the ` setup() ` method of the test:
5755
5856``` groovy
57+ @Override
58+ Closure doWithSpring() {
59+ return {
60+ constraintEvaluator(DefaultConstraintEvaluator)
61+ }
62+ }
63+
5964def setup() {
6065 CascadeConstraintRegistration.register(applicationContext)
6166}
You can’t perform that action at this time.
0 commit comments