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

Bean Validation annotation not supported #116

Open
bassmartin opened this issue Dec 19, 2018 · 0 comments
Open

Bean Validation annotation not supported #116

bassmartin opened this issue Dec 19, 2018 · 0 comments

Comments

@bassmartin
Copy link

I have some Domain classes that are using the Bean Validation API (http://gorm.grails.org/6.1.x/whatsNew/manual/) since it allows the Framework and Vaadin to use the same validation rules.

Those beans cannot use features of the 'build-test-data' plugin since Grails 3.3 (Grails 3.3.9 plugin 3.3.1) It was working with Grails 3.2.x and plugin 3.0.1

When a build() method is called, this stacktrace shows
`java.lang.RuntimeException: No constraints found for persistent entity XXX. Make sure it's mocked and properly initialized.

at grails.buildtestdata.builders.PersistentEntityDataBuilder.getConstraintsMap(PersistentEntityDataBuilder.groovy:106)
at grails.buildtestdata.builders.ValidateableDataBuilder.findRequiredPropertyNames(ValidateableDataBuilder.groovy:110)
at grails.buildtestdata.builders.ValidateableDataBuilder.<init>(ValidateableDataBuilder.groovy:95)
at grails.buildtestdata.builders.PersistentEntityDataBuilder.<init>(PersistentEntityDataBuilder.groovy:44)
at grails.buildtestdata.builders.PersistentEntityDataBuilder$Factory.build(PersistentEntityDataBuilder.groovy:32)
at grails.buildtestdata.TestData.createBuilder(TestData.groovy:118)
at grails.buildtestdata.TestData.findBuilder(TestData.groovy:105)
at grails.buildtestdata.TestData.build(TestData.groovy:77)
at grails.buildtestdata.TestData.build(TestData.groovy:35)
at grails.buildtestdata.BuildTestDataGrailsPlugin.addBuildMetaMethods_closure1$_closure2(BuildTestDataGrailsPlugin.groovy:36)
at grails.buildtestdata.BuildTestDataGrailsPlugin.addBuildMetaMethods_closure1$_closure2(BuildTestDataGrailsPlugin.groovy)
at groovy.lang.Closure.call(Closure.java:418)
at XXXServiceIntegrationSpec.$tt__$spock_feature_0_2(XXXServiceIntegrationSpec.groovy:130)

`

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant