inst.setCk(2); // DUPLICATE !!
inst.setVal("4");
batch.insert(inst, PersistOption.ifNotExists());
} finally { batch.close(); } // Batch.close() implicitly calls Batch.submitBatch()
BatchCKEntity loaded = session.loadOne(BatchCKEntity.class, 11, 1);
Assert.assertNotNull(loaded);
Assert.assertEquals(loaded.getVal(), "1");
loaded = session.loadOne(BatchCKEntity.class, 11, 2);
Assert.assertNotNull(loaded);
Assert.assertEquals(loaded.getVal(), "2");