Junilu Lacar wrote:When you submit a form, the submit button isn't included in the request.
Tim Holloway wrote:
An HTML INPUT TYPE=SUBMIT won't submit the NAME= attribute, but it does submit the control's VALUE= attribute, which is the button's displayed value.
Stephan van Hulst wrote:Which I think is good advice regardless of Spring, because what does it even mean for a class "Person" to have a field named "person"?
Jf Okeeffe wrote:... there are cases it does make sense. For instance, if you have a class called "Language" with an attribute that is also called "language" (english, spanish...) and an attribute "profficiency" (basic, fluent...).
Junilu Lacar wrote:English can't be "basic" in itself.
Tim Holloway wrote:Having a property named "person" within class Person is totally OK with Spring, though...
Jf Okeeffe wrote:It doesn't work when there's a class attribute that has the same name of the model class name (ex Class Test with attribute test).
Jf Okeeffe wrote:"wer" is the content I filled in the input box and then clicked save.
Could have filled with anything else.
Tim Holloway wrote:The operation is failing because you've told Spring to jam a non-numeric value ("wer") into the numeric CRUDRepository ID.