diff options
Diffstat (limited to 'cps-ri')
-rw-r--r-- | cps-ri/src/main/java/org/onap/cps/spi/repository/TempTableCreator.java | 3 |
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 338b0b1c6..d798932c0 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, |