aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-07-15 23:12:00 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-07-15 23:12:00 +0200
commit708361592b7f0a5639676f5be34d105643accbaf (patch)
tree8ee4be94c64cd6e0f72ca2588987ba5ff87e662f
parent7b04ba6913de738897a84c27dd2fa4dd1cbcb5f7 (diff)
downloadsonarqube-708361592b7f0a5639676f5be34d105643accbaf.tar.gz
sonarqube-708361592b7f0a5639676f5be34d105643accbaf.zip
Try to fix support of bulk insert of properties with postgresql
-rw-r--r--sonar-core/src/main/java/org/sonar/core/properties/PropertiesDao.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/properties/PropertiesDao.java b/sonar-core/src/main/java/org/sonar/core/properties/PropertiesDao.java
index a496d826fc6..7dfab47df1e 100644
--- a/sonar-core/src/main/java/org/sonar/core/properties/PropertiesDao.java
+++ b/sonar-core/src/main/java/org/sonar/core/properties/PropertiesDao.java
@@ -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()));
}