diff --git a/pom.xml b/pom.xml index bbf2b16..c8f7276 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ io.github.osvaldjr easy-cucumber jar - 0.0.10 + 0.0.11 io.github.osvaldjr:easy-cucumber Easy Cucumber JVM Testing diff --git a/src/main/java/io/github/osvaldjr/usecases/DatabaseBulkSQLInsertUseCase.java b/src/main/java/io/github/osvaldjr/usecases/DatabaseBulkSQLInsertUseCase.java index 8409032..d7e49d5 100644 --- a/src/main/java/io/github/osvaldjr/usecases/DatabaseBulkSQLInsertUseCase.java +++ b/src/main/java/io/github/osvaldjr/usecases/DatabaseBulkSQLInsertUseCase.java @@ -14,6 +14,7 @@ public class DatabaseBulkSQLInsertUseCase { @Transactional public void execute(String sql) { + entityManager.joinTransaction(); entityManager.createNativeQuery(sql).executeUpdate(); } } diff --git a/src/main/java/io/github/osvaldjr/usecases/DatabaseTableInsertUseCase.java b/src/main/java/io/github/osvaldjr/usecases/DatabaseTableInsertUseCase.java index d07e720..71087d5 100644 --- a/src/main/java/io/github/osvaldjr/usecases/DatabaseTableInsertUseCase.java +++ b/src/main/java/io/github/osvaldjr/usecases/DatabaseTableInsertUseCase.java @@ -27,6 +27,7 @@ public void execute(String tableName, List lines) { String columns = getColumns(lines.get(0)); String values = getInsertValues(lines); String query = format("INSERT INTO %s (%s) VALUES %s;", tableName, columns, values); + entityManager.joinTransaction(); entityManager.createNativeQuery(query).executeUpdate(); }