After adding a Model attribute in the @GetMapping
do you need add all fields using th:field="*{...}"
in the view's form?
For example, if I add a User to the model and I want a form that edits the name but not the DOB or anything else can I just use th:field
on just the name and not include the other fields?
It still seems to work when I create a @GetMapping
for edit I pass the model and just have the th:field
for just the name, but online I see people adding all of the fields to the form.
I can understand if you are trying to save the Entity, but if you're editing does it make a difference that I just don't understand?