[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5935) stateless session does not commit in batches by default, it commits one by one

radhakrishna (JIRA) noreply at atlassian.com
Thu Feb 17 14:38:05 EST 2011


stateless session does not commit in batches by default, it commits one by one
------------------------------------------------------------------------------

                 Key: HHH-5935
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5935
             Project: Hibernate Core
          Issue Type: Sub-task
    Affects Versions: 3.2.2
            Reporter: radhakrishna


execute(new StatelessHibernateCallback<T>() {
			public T doInStatelessSession(StatelessSession statelessSession) {
				
				for(Entity entity : entitiesBatch){
					statelessSession.insert(entity);
				}
				
				return null;
			}
		});

inserts entity by entity which is completely ABSURD. Should'nt it insert all of them or none, rather it is inserting one by one by default. I have been using this to insert millions of records assuming it is batching, which is a shame.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list