cartymc1 wrote:
on the server side we open a different session and call saveOrUpdate(A) ,
If my understanding is correct, the only way you can optimize away the SELECTs to check for dirty is if you can re-use the same session for the UI write cycle. Since it will have already seen and cached the values from the read.
I'm not very clued up on 2nd level caches, maybe they can help out in this situation.
How are you expecting Hibernate to know which items in the Set have been, added, removed, changed ? In your mind how does that algorithm work without calling a database ?
The open session is where object instance memory is kept, and you say you use a different one to saveOrUpdate().