HHH-11127 - Confused batch processing doc example
This commit is contained in:
parent
4dbef2fdf0
commit
814ea97b85
|
@ -206,7 +206,7 @@ public class BatchTest extends BaseEntityManagerFunctionalTestCase {
|
||||||
Person Person = new Person( String.format( "Person %d", i ) );
|
Person Person = new Person( String.format( "Person %d", i ) );
|
||||||
entityManager.persist( Person );
|
entityManager.persist( Person );
|
||||||
|
|
||||||
if ( i % batchSize == 0 ) {
|
if ( i > 0 && i % batchSize == 0 ) {
|
||||||
//flush a batch of inserts and release memory
|
//flush a batch of inserts and release memory
|
||||||
entityManager.flush();
|
entityManager.flush();
|
||||||
entityManager.clear();
|
entityManager.clear();
|
||||||
|
|
Loading…
Reference in New Issue