aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-04-10 10:01:03 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-04-10 10:01:03 +0200
commit5c4d2aa637ee0adcbc7859808fd8eb0e338acee9 (patch)
treeffbf198e342ace80afa54f83f26a7ad1229acc13
parentd86cd8830f9f2127787aaf1f099f1ae3041a2756 (diff)
downloadsonarqube-5c4d2aa637ee0adcbc7859808fd8eb0e338acee9.tar.gz
sonarqube-5c4d2aa637ee0adcbc7859808fd8eb0e338acee9.zip
SONAR-3755 fix IssueDAO select query
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/issue/IssueMapper.xml15
1 files changed, 9 insertions, 6 deletions
diff --git a/sonar-core/src/main/resources/org/sonar/core/issue/IssueMapper.xml b/sonar-core/src/main/resources/org/sonar/core/issue/IssueMapper.xml
index 9a520f62d66..58da2b3548d 100644
--- a/sonar-core/src/main/resources/org/sonar/core/issue/IssueMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/issue/IssueMapper.xml
@@ -97,13 +97,16 @@
and root.project_id=p.id
and root.islast=${_true}
and (s.id=root.id or (s.root_snapshot_id=root.id and
- <if test="_databaseId != 'mssql'">
- s.path LIKE root.path || root.id || '.%'
- </if>
- <if test="_databaseId == 'mssql'">
- s.path LIKE root.path + root.id + '.%'
- </if>
+ <choose>
+ <when test="_databaseId == 'mssql'">
+ s.path LIKE root.path + root.id + '.%'
+ </when>
+ <otherwise>
+ s.path LIKE root.path || root.id || '.%'
+ </otherwise>
+ </choose>
))
+ and s.islast=${_true}
and i.resource_id=s.project_id
</if>