]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8325 Fix bad imports in MeasureMapper#selectByQuery
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 3 Nov 2016 15:11:34 +0000 (16:11 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 3 Nov 2016 15:24:42 +0000 (16:24 +0100)
sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml

index 929ad1c44127834791e5fb0c6a4b59784507f00d..3b12f1552c2673008ce58a46e3f1baa0be1b9887 100644 (file)
 
   <select id="selectByQueryOnComponents" parameterType="map" resultType="Measure">
     select <include refid="measureColumns"/> from project_measures pm
+    <include refid="selectByQueryCommonJoin"/>
     inner join projects p on p.project_uuid=analysis.component_uuid and p.uuid=pm.component_uuid
       and p.project_uuid=#{query.projectUuid}
-      and p.uuid in
-      <foreach item="componentUuid" collection="query.getComponentUuids()" open="(" separator="," close=")">
-        #{componentUuid}
-      </foreach>
-    <include refid="selectByQueryCommonJoin"/>
     where
     <include refid="selectByQueryCommonFilters"/>
+    and pm.component_uuid in
+    <foreach item="componentUuid" collection="query.getComponentUuids()" open="(" separator="," close=")">
+      #{componentUuid}
+    </foreach>
   </select>
 
   <select id="selectByQueryOnSingleComponent" parameterType="map" resultType="Measure">
     select <include refid="measureColumns"/> from project_measures pm
+    <include refid="selectByQueryCommonJoin"/>
     inner join projects p on p.project_uuid=analysis.component_uuid
       and p.uuid=pm.component_uuid
-      and p.uuid=#{query.componentUuid}
-    <include refid="selectByQueryCommonJoin"/>
     where
     <include refid="selectByQueryCommonFilters"/>
+    and pm.component_uuid=#{query.componentUuid}
   </select>
 
   <sql id="selectByQueryCommonJoin">