This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Object Relational Mapping and the fly likes Batch Update Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Batch Update" Watch "Batch Update" New topic

Batch Update

lavnish lalchandani
Ranch Hand

Joined: Feb 28, 2007
Posts: 79

on the blog

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
I agree. Here's the link:
subject: Batch Update