diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-06-10 13:41:25 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-06-10 13:41:25 +0200 |
commit | fb4a58afd8f1857ce4fd115c2ee31f653f7897d1 (patch) | |
tree | a10b11d1ba29b235058c1a9afc314676ca2e3dc1 /sonar-core | |
parent | 39eba6bd7c7b94ec382c0d4ba21be03c60bb5540 (diff) | |
download | sonarqube-fb4a58afd8f1857ce4fd115c2ee31f653f7897d1.tar.gz sonarqube-fb4a58afd8f1857ce4fd115c2ee31f653f7897d1.zip |
Refactor the SQL request to select notif properties
It should restore the compatibility with all supported dbs.
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/resources/org/sonar/core/properties/PropertiesMapper.xml | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sonar-core/src/main/resources/org/sonar/core/properties/PropertiesMapper.xml b/sonar-core/src/main/resources/org/sonar/core/properties/PropertiesMapper.xml index 1a15db272d4..18297848cd6 100644 --- a/sonar-core/src/main/resources/org/sonar/core/properties/PropertiesMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/properties/PropertiesMapper.xml @@ -4,16 +4,16 @@ <mapper namespace="org.sonar.core.properties.PropertiesMapper"> <select id="findUsersForNotification" parameterType="map" resultType="String"> - SELECT U.login - FROM properties P, users U + select u.login + from users u + inner join properties p on p.user_id=u.id <if test="projectUuid == null"> - WHERE P.user_id = U.id AND P.prop_key = #{notifKey} AND P.text_value LIKE 'true' - AND P.resource_id is null + where p.prop_key = #{notifKey} and p.text_value LIKE 'true' and p.resource_id is null </if> <if test="projectUuid != null"> - inner join projects c on c.id=P.resource_id - WHERE P.user_id = U.id AND P.prop_key = #{notifKey} AND P.text_value LIKE 'true' - AND c.uuid = #{projectUuid} + inner join projects c on c.id=p.resource_id + where p.prop_key = #{notifKey} AND p.text_value LIKE 'true' + and c.uuid = #{projectUuid} and p.resource_id is not null </if> </select> |