I have a for loop to generate multiple entities and save into database.
for(int x = 0; x < 3; x++){ Unit unit = new Unit(); unit.id = 0; //autogene