michael wrote:
Just change your objects, there is no need to call update() for objects still within session scope.
Hibernate is running in the server and object modification is in the client side
And when the client changes a object, I do not send a request for the server that can be the reason why changes should not be detected by the session.
I think I can handle it like;
Client : request to server : give me the tasks
Client changes some attributes of task
Send another request to the server : update
Server gets request and calls session.clear() session.update(request parameter)
That is why I think I should use clear and update each time.
But calling clear before each update makes me to feel uncomfortible about the performance.
I wanted to know the drawbacks of session.clear exactly.
What about session.evict(Object) ? Is this removes the object from the session?