HHH-11127 - Confused batch processing doc example

This commit is contained in:
Vlad Mihalcea 2016-10-10 12:15:58 +03:00
parent 4dbef2fdf0
commit 814ea97b85
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ public class BatchTest extends BaseEntityManagerFunctionalTestCase {
Person Person = new Person( String.format( "Person %d", i ) );
entityManager.persist( Person );
if ( i % batchSize == 0 ) {
if ( i > 0 && i % batchSize == 0 ) {
//flush a batch of inserts and release memory
entityManager.flush();
entityManager.clear();