]> source.dussan.org Git - sonarqube.git/commitdiff
Fix loading of Hibernate rules on MyBatis
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 25 Mar 2014 08:11:38 +0000 (09:11 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 25 Mar 2014 08:11:38 +0000 (09:11 +0100)
sonar-server/src/main/java/org/sonar/server/startup/RegisterNewProfiles.java

index dca04a3dcaa0869f8a2d83031743c55cb2090f36..c882fdf8a61fc6d1edff8d32a25b640a5d5cd48d 100644 (file)
@@ -85,7 +85,7 @@ public class RegisterNewProfiles {
     session = sessionFactory.getSession();
 
     // hibernate session can contain an invalid cache of rules
-    session.getEntityManager().clear();
+    session.commit();
 
     ListMultimap<String, RulesProfile> profilesByLanguage = loadDefinitions();
     for (String language : profilesByLanguage.keySet()) {