0

I am new in Grails application development(Springsource eclipse). I used scaffolding to do the CRUD operation and got a bizarre error. Although I filled out all fields to create table I got the message that "Property [name] of class [class racetrack.Race] cannot be null". Whenever I changed the constraint to nullable it works but put that field empty. It seems it does not accept my input.

Thanks for your help, Reza

Reza
  • 739
  • 1
  • 10
  • 24
  • 2
    Please show the relevant pieces of your code: domain class, controller and maybe view if any. – Victor Sergienko Jul 21 '12 at 20:11
  • 1
    Yeah. We need more information than that... but check if your form fields (in your .gsp) has the input name matching your object's attribute. I know you used scaffold but, maybe you changed the name after? If it's not that, edit this post with some code from your view and model. – Tiago Farias Jul 21 '12 at 23:37
  • Thanks Tiago! you are right. It seems that I unexpectedly changed that field name. Now it's working! – Reza Jul 22 '12 at 02:09
  • @Tiago you should make that an answer so that Reza can accept it. – Weezle Jul 24 '12 at 20:59

1 Answers1

1

Check if your form fields (in your .gsp) has the input name matching your object's attribute. I know you used scaffold but, maybe you changed the name after? If it's not that, edit this post with some code from your view and model.

Tiago Farias
  • 3,397
  • 1
  • 27
  • 30