fixed generated ID when inserting external rows in BATCH mode