Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Batch Update

 
lavnish lalchandani
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi


on the blog
http://abramsm.wordpress.com/2009/02/07/why-doesnt-hibernate-automatically-update-changed-objects/#comment-132

The person says this code will not perform any update after 21 ... i didnt understand this

Suppose the loop reaches 21st object then it compares what to what ? you say ” … it compares any changes to the field values of the object to the values in the cache.” now so as per my understanding it will try to compare 21st object to an object in cache BUT the cache is empty HENCE ( as after 20th object we cleared it ) so comparison should result false and hence update should happen … i am not sure why comparison will result in true
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic