From 6c5dbb1cd3d9cc8775bd057bcac106a32a326332 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Thu, 30 May 2013 12:06:41 +0200 Subject: [PATCH] Fix issue on mapper loading order --- .../src/main/java/org/sonar/core/persistence/MyBatis.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java b/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java index a1660f4a28e..41d9eb9200a 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java @@ -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); -- 2.39.5