From: Teryk Bellahsene Date: Mon, 1 Jun 2015 12:43:49 +0000 (+0200) Subject: refactoring - fix MetricMapper 'key' use as it's a keyword in DBMS X-Git-Tag: 5.2-RC1~1743 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=abee7ce5569f3ec2dc43f0936770b3848183b9ce;p=sonarqube.git refactoring - fix MetricMapper 'key' use as it's a keyword in DBMS --- diff --git a/sonar-core/src/main/java/org/sonar/core/metric/db/MetricDto.java b/sonar-core/src/main/java/org/sonar/core/metric/db/MetricDto.java index a821c9bd114..233e3616075 100644 --- a/sonar-core/src/main/java/org/sonar/core/metric/db/MetricDto.java +++ b/sonar-core/src/main/java/org/sonar/core/metric/db/MetricDto.java @@ -27,7 +27,7 @@ public class MetricDto { private Integer id; - private String key; + private String kee; private String shortName; @@ -67,11 +67,11 @@ public class MetricDto { } public String getKey() { - return key; + return kee; } public MetricDto setKey(String name) { - this.key = name; + this.kee = name; return this; } diff --git a/sonar-core/src/main/resources/org/sonar/core/metric/db/MetricMapper.xml b/sonar-core/src/main/resources/org/sonar/core/metric/db/MetricMapper.xml index 04d03f221b6..e8a121e6d9f 100644 --- a/sonar-core/src/main/resources/org/sonar/core/metric/db/MetricMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/metric/db/MetricMapper.xml @@ -5,7 +5,7 @@ m.id, - m.name as key, + m.name as kee, m.description, m.direction, m.domain, @@ -63,7 +63,7 @@ name, description, direction, domain, short_name, qualitative, val_type, user_managed, enabled, origin, worst_value, best_value, optimized_best_value, hidden, delete_historical_data) VALUES ( - #{key, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{direction, jdbcType=INTEGER}, + #{kee, jdbcType=VARCHAR}, #{description, jdbcType=VARCHAR}, #{direction, jdbcType=INTEGER}, #{domain, jdbcType=VARCHAR}, #{shortName, jdbcType=VARCHAR}, #{qualitative, jdbcType=BOOLEAN}, #{valueType, jdbcType=VARCHAR}, #{userManaged, jdbcType=BOOLEAN}, #{enabled, jdbcType=BOOLEAN}, #{origin, jdbcType=VARCHAR}, #{worstValue, jdbcType=DOUBLE}, #{bestValue, jdbcType=DOUBLE},