Article articles[] = new Article[ADDITIONAL];
for (int i = 0; i < ADDITIONAL; i++) {
if (i%2 == 0) {
articles[i] = new Service();
} else {
articles[i] = new Materiel();
}
}
// make persistent
pm.currentTransaction().begin();
pm.makePersistentAll(articles);