]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3437 fix mapping for Oracle
authorDavid Gageot <david@gageot.net>
Tue, 10 Jul 2012 14:52:56 +0000 (16:52 +0200)
committerDavid Gageot <david@gageot.net>
Tue, 10 Jul 2012 14:53:00 +0000 (16:53 +0200)
sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper-oracle.xml
sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper.xml

index b64fb24264666f85264d8b36c1af5ca36e2fa8f4..2e4c7fd0d2f64db043dbc9a3b50c7669ddfe9b18 100644 (file)
   </insert>
 
   <insert id="insertData" parameterType="MeasureModel" useGeneratedKeys="false">
-    <selectKey order="BEFORE" resultType="Long" keyProperty="id">
-      select measure_data_seq.NEXTVAL from DUAL
-    </selectKey>
     INSERT INTO measure_data (id, measure_id, snapshot_id, data)
-    VALUES (#{id}, #{measureData.measure.id}, #{snapshotId}, #{measureData.data}) 
+    VALUES (measure_data_seq.NEXTVAL, #{id}, #{snapshotId}, #{measureData.data})
   </insert>
   
   <update id="update" parameterType="MeasureModel">
index c6eee0d29f793c5a37417dccb824660806397c85..c89f8eed8d1450cb884c52ede49621851f56962c 100644 (file)
@@ -31,7 +31,7 @@
   
   <insert id="insertData" parameterType="MeasureModel" useGeneratedKeys="false">
     INSERT INTO measure_data (measure_id, snapshot_id, data)
-    VALUES (#{measureData.measure.id}, #{snapshotId}, #{measureData.data}) 
+    VALUES (#{id}, #{snapshotId}, #{measureData.data})
   </insert>
   
   <update id="update" parameterType="MeasureModel">