]> source.dussan.org Git - sonarqube.git/commitdiff
Fix issue on mapper loading order
authorJulien Lancelot <julien.lancelot@gmail.com>
Thu, 30 May 2013 10:06:41 +0000 (12:06 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Thu, 30 May 2013 10:06:41 +0000 (12:06 +0200)
sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java

index a1660f4a28e78fc8009ee42d9576b1411f89046d..41d9eb9200a83bcca27e019d792a5e4ee4178cbf 100644 (file)
@@ -121,8 +121,7 @@ public class MyBatis implements BatchComponent, ServerComponent {
 
     Class<?>[] mappers = {ActiveDashboardMapper.class, AuthorMapper.class, DashboardMapper.class,
       DependencyMapper.class, DuplicationMapper.class, GraphDtoMapper.class,
-      // ResourceMapper has to be loaded before IssueMapper because this last one used it
-      ResourceMapper.class, IssueMapper.class, IssueStatsMapper.class, IssueChangeMapper.class,
+      IssueMapper.class, IssueStatsMapper.class, IssueChangeMapper.class,
       LoadedTemplateMapper.class, MeasureFilterMapper.class, PropertiesMapper.class, PurgeMapper.class, ResourceKeyUpdaterMapper.class, ResourceIndexerMapper.class,
       ResourceSnapshotMapper.class, RoleMapper.class, RuleMapper.class, SchemaMigrationMapper.class,
       SemaphoreMapper.class, UserMapper.class, WidgetMapper.class, WidgetPropertyMapper.class, MeasureMapper.class, SnapshotDataMapper.class,
@@ -130,6 +129,8 @@ public class MyBatis implements BatchComponent, ServerComponent {
     };
     // AuthorizationMapper has to be loaded before IssueMapper because this last one used it
     loadMapper(conf, "org.sonar.core.user.AuthorizationMapper");
+    // ResourceMapper has to be loaded before IssueMapper because this last one used it
+    loadMapper(conf, ResourceMapper.class);
     loadMappers(conf, mappers);
     configureLogback(mappers);