So, how I can update only what changes and is not null ? In the case of a not null field, to normal fields the update works fine...
For an example, I have one entity...
Client: code(key), name, street,number,dateSave(the date that this client is saved in the system...)
So the dateSave field is saved only in the SAVE method, and it never change. But when I try to perform one Session.update call on a client row, I get the follow error.
Code:
org.hibernate.PropertyValueException: not-null property references a null or transient value: Client.dateSave
The work arround that I use to perform this behavior is to programaticly create one UPDATE HQL Query to update my registry. This works fine but it seems that it is not the best aproach =/
How can I do this with a simple call to Session.update ? Exists any mapping property that I can set to perform this behavior ?
Thanks in advance.
Rodrigo Kerkhoff