grails-samples / grails-petclinic

The introductory sample application for Grails
68 stars 93 forks source link

Cannot add or edit a new Pet #21

Closed caseyscarborough closed 10 years ago

caseyscarborough commented 10 years ago

When trying to add or edit a pet, the following error is received even when the Name field is populated:

Property [name] of class [org.grails.samples.petclinic.Pet] cannot be null

See the following:

screen shot 2014-08-26 at 12 08 03 pm

It looks like this is caused by the name of the field for the pet name being pet_name, but in the PetController the value is being retrieved from params?.pet?.name (which is null).

graemerocher commented 10 years ago

Thanks for the contribution