SimpleFormController with hibernate pojo as backing object
I really would like to know your opinions on this one:
I am doing a web application that has a form (basically an edit mask) which is filled with the properties of a hibernate pojo. This pojo has several associations to other tables, so it has a lot of lazy-loading collections on it.
What I really want to do in the edit form is edit some direct properties of this pojo - let's say the property "name".
The problem is, that I have all the primary properties of my pojo in my form, but not the associated values. If I simply save them to the database, all associations are gone since the backing object was created using only all given information in the form - and those didnt contain any collections or such.
Is there a clever pattern that you use for those cases? I mean, okay - i could always use a "command" that has only the user specific properties and then copy all the values to my *real* user, but that would feel kinda awkward, since the "Backing Object" pattern was invented to prevent doing stuff like this, wasn't it?