]> source.dussan.org Git - sonarqube.git/commitdiff
Try to fix support of bulk insert of properties with postgresql
authorSimon Brandhof <simon.brandhof@gmail.com>
Sun, 15 Jul 2012 21:12:00 +0000 (23:12 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Sun, 15 Jul 2012 21:12:00 +0000 (23:12 +0200)
sonar-core/src/main/java/org/sonar/core/properties/PropertiesDao.java

index a496d826fc68e535908417fb4968f1895193d25c..7dfab47df1ed898928d913c3515337ebe57c857b 100644 (file)
@@ -122,6 +122,7 @@ public class PropertiesDao implements BatchComponent, ServerComponent {
       for (Map.Entry<String, String> entry : properties.entrySet()) {
         mapper.deleteGlobalProperty(entry.getKey());
       }
+      session.commit();//required for postgresql bulk inserts (?)
       for (Map.Entry<String, String> entry : properties.entrySet()) {
         mapper.insert(new PropertyDto().setKey(entry.getKey()).setValue(entry.getValue()));
       }