flush before updating legacy-ids

This commit is contained in:
Michael Hoennig 2024-02-05 12:34:22 +01:00
parent c66580a8b3
commit 3dd8916999

View File

@ -596,6 +596,7 @@ public class ImportOfficeData extends ContextBasedTest {
Map<Integer, E> entities,
final String legacyIdTable,
final String legacyIdColumn) {
em.flush();
entities.forEach((id, entity) -> em.createNativeQuery("""
UPDATE ${legacyIdTable}
SET ${legacyIdColumn} = :legacyId