Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails warning at compile of controllers

Tags:

grails

I am currently getting the warning in Grails of

'The [update] action accepts a parameter of type [edu.acu.teachereval.SubjectCode] which has not been marked with @Validateable. Data binding will still be applied to this command object but the instance will not be validateable. @Transactional'

along with the same errors for show, save, edit, and delete for the controller mentioned in the error and other controllers that I have created. I have seen this issue for user created functions, but I have not seen this error for functions that are built in to grails. Any assistance would be appreciated.

like image 392
Jakel309 Avatar asked Jan 15 '14 15:01

Jakel309


2 Answers

I think you need to add a @Validateable annotation to your SubjectCode class.

Reference

like image 69
rcgeorge23 Avatar answered Oct 15 '22 13:10

rcgeorge23


This may be coming late, But this error is likely to occur when you use models not created in the domain conventional folder.

It seems grails automatically injects the @Validateable annotation to domain classes/models in the domain Folder,

If you therefore create your models in the src/grails or src/java folder, You are likely to get this error when the model object is passed/posted/submited via a View to a controller function.

  1. Try adding the @Validateable annotation to the domain object
  2. Move the domain model to the domain grails convention folder
like image 34
JohnTheBeloved Avatar answered Oct 15 '22 14:10

JohnTheBeloved