summaryrefslogtreecommitdiffstats
path: root/cps-ri/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ri/src/main')
-rw-r--r--cps-ri/src/main/java/org/onap/cps/spi/repository/TempTableCreator.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/cps-ri/src/main/java/org/onap/cps/spi/repository/TempTableCreator.java b/cps-ri/src/main/java/org/onap/cps/spi/repository/TempTableCreator.java
index 338b0b1c64..d798932c02 100644
--- a/cps-ri/src/main/java/org/onap/cps/spi/repository/TempTableCreator.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/repository/TempTableCreator.java
@@ -60,6 +60,7 @@ public class TempTableCreator {
final StringBuilder sqlStringBuilder = new StringBuilder("CREATE TEMPORARY TABLE ");
sqlStringBuilder.append(tempTableName);
defineColumns(sqlStringBuilder, columnNames);
+ sqlStringBuilder.append(" ON COMMIT DROP;");
insertData(sqlStringBuilder, tempTableName, columnNames, sqlData);
entityManager.createNativeQuery(sqlStringBuilder.toString()).executeUpdate();
return tempTableName;
@@ -95,7 +96,7 @@ public class TempTableCreator {
sqlStringBuilder.append(",");
}
}
- sqlStringBuilder.append(");");
+ sqlStringBuilder.append(")");
}
private static void insertData(final StringBuilder sqlStringBuilder,