This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes batch insert/update + Hibernate - ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "batch insert/update + Hibernate - ?" Watch "batch insert/update + Hibernate - ?" New topic

batch insert/update + Hibernate - ?

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1407
How can i do batch insert/update using hibernate ?
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Hibernate is not the best choice if you need to do large scale batch processing. Better are the database's own bulk loading tools.

However, if you do want to do it, the documentation has a section on bacth processing. Basically, not much is different, you just need to remember to flush the session frequently to avoind OutOfMemoryErrors.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: batch insert/update + Hibernate - ?
It's not a secret anymore!