]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6993 Fix SQL query on MsSQL and Oracle
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 12 Nov 2015 14:08:25 +0000 (15:08 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 12 Nov 2015 14:08:25 +0000 (15:08 +0100)
sonar-db/src/main/resources/org/sonar/db/duplication/DuplicationMapper.xml

index 916eba5ad9682b4909dba17407d385d34d21405a..af67fef05842f11dcd585c0a7dd080858c31bcf8 100644 (file)
     duplication_block.index_in_file as indexInFile,
     duplication_block.start_line as startLine,
     duplication_block.end_line as endLine,
-    file.kee as componentKey
+    file_component.kee as componentKey
     FROM duplications_index duplication_block
     INNER JOIN snapshots snapshot ON duplication_block.snapshot_id=snapshot.id AND snapshot.islast=${_true}
-    INNER JOIN projects file ON file.id=snapshot.project_id AND file.language=#{language} AND file.enabled=${_true}
+    INNER JOIN projects file_component ON file_component.id=snapshot.project_id AND file_component.language=#{language}
+    AND file_component.enabled=${_true}
     <where>
       AND duplication_block.hash in
       <foreach collection="hashes" open="(" close=")" item="hash" separator=",">#{hash}</foreach>