]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4321 Fix issue on alias
authorJulien Lancelot <julien.lancelot@gmail.com>
Fri, 14 Jun 2013 17:03:19 +0000 (19:03 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Fri, 14 Jun 2013 17:03:19 +0000 (19:03 +0200)
sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml

index 3a3955aca9a230932f86e44e6dcfefb87a9832dd..394c9d56b734aa43c270801a3e69ae03d9b03d7c 100644 (file)
   </select>
 
   <sql id="selectAuthorizedChildrenComponentIdsQuery">
-    select s.project_id from snapshots s, (
+    select s.project_id
+    from snapshots s, (
     select project_components.id as id,
       snapshot_components.id as sid,
       root_snapshot_components.project_id as root_project_id,
       <include refid="org.sonar.core.user.AuthorizationMapper.selectAuthorizedRootProjectsIdsQuery" />
     ) authorized_projects on authorized_projects.root_project_id = root_snapshot_components.project_id
     <where>
-      and (<foreach item="componentRootKey" index="index" collection="componentRootKeys" open="(" separator=" or " close=")"> project_components.kee=#{componentRootKey}</foreach>)
+      and <foreach item="componentRootKey" index="index" collection="componentRootKeys" open="(" separator=" or " close=")"> project_components.kee=#{componentRootKey}</foreach>
       and project_components.enabled = ${_true}
     </where>
-    ) as authorized_input_components
+    ) authorized_input_components
     <where>
       and s.root_project_id = authorized_input_components.root_project_id
       and s.islast = ${_true}
     </where>
   </sql>
 
-  <sql id="selectProjectIdsFromComponentKeysQuery">
-    select p.id from projects p
-    <where>
-      p.enabled=${_true}
-      and p.kee in <foreach item="componentKey" index="index" collection="componentRootKeys" open="(" separator="," close=")">#{componentKey}</foreach>
-    </where>
-  </sql>
-
   <insert id="insert" parameterType="Resource" useGeneratedKeys="true" keyProperty="id">
     insert into projects
     (name, long_name, description, scope, qualifier, kee, language, root_id, copy_resource_id, person_id, enabled, created_at)