diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-06-14 19:03:19 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-06-14 19:03:19 +0200 |
commit | 219b51f0f50420aef965b0261e61b1d5b4e5323a (patch) | |
tree | 95cffa5146623abfc8ccda1293571f88e5842c6e /sonar-core | |
parent | 11c9d4f6e496041a0dee7b7f637890a51f2a8632 (diff) | |
download | sonarqube-219b51f0f50420aef965b0261e61b1d5b4e5323a.tar.gz sonarqube-219b51f0f50420aef965b0261e61b1d5b4e5323a.zip |
SONAR-4321 Fix issue on alias
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml index 3a3955aca9a..394c9d56b73 100644 --- a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml @@ -126,7 +126,8 @@ </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, @@ -139,10 +140,10 @@ <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} @@ -166,14 +167,6 @@ </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) |