save « Batch « JPA Q&A





1. Faster way to batch saves with Hibernate?    stackoverflow.com

I have a program which reads a text file line by line, and creates a Hibernate entity object from each line, and saves them. I have several such text files ...

2. Batch Saves    forum.hibernate.org

Hibernate version: 2.1.1 Mapping documents: Code between sessionFactory.openSession() and session.close(): Full stack trace of any exception that occurs: net.sf.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 0, of class: com.gsk.les.bo.himpl.IHNotesDatabaseSpec at net.sf.hibernate.impl.SessionImpl.checkUniqueness(SessionImpl.java:1605) at net.sf.hibernate.impl.SessionImpl.doUpdateMutable(SessionImpl.java:1377) at net.sf.hibernate.impl.SessionImpl.doUpdate(SessionImpl.java:1403) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1327) at com.gsk.les.bp.himpl.IHBizObjBPs.genericBulkSaveOrUpdate(IHBizObjBPs.java:135) at test.TestBulk.main(TestBulk.java:24) Name and version of the database you are using: Oracle The generated ...

3. Using the same session for batch save    forum.hibernate.org

Thank you for your reply. I am using Hibernate 2.1.6. And the document is for Hibernate 3. But I think the concept applies to Hibernate 2.1.6. One thing I did not understood from the document is that, why do we need to do beginTransaction() and commitTransaction(). I am using Stateless Session Ejbs. Do we have to do this???. Thank You D ...

4. Cascade with batch save    forum.hibernate.org

Hi there, I 'm using Hibernate for like 2 years, but I'm new to the forum, so, Hello all! I'm trying to save a one-to-many relationship by the "one" side, but the many side is got a huge amount of data. I usually do the batch-size, session.flush and session.clear thing, but it seems that in a cascade, where I only tell ...