]> source.dussan.org Git - sonarqube.git/commitdiff
Fix PurgeDao for SQLServer - second attempt
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 14 Feb 2012 11:51:24 +0000 (12:51 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 14 Feb 2012 11:51:24 +0000 (12:51 +0100)
sonar-core/src/main/resources/org/sonar/core/purge/PurgeVendorMapper-mssql.xml

index 7f086c79613e0a866c3384f38c43613324a1ff40..b47bf4f3213694439f63aba4d1f540d50e0d4e15 100644 (file)
@@ -4,11 +4,15 @@
 <mapper namespace="org.sonar.core.purge.PurgeVendorMapper">
 
   <delete id="deleteResourceReviewComments" parameterType="long">
-    delete from review_comments rc inner join reviews r on rc.review_id=r.id where r.resource_id=#{id}
+    delete review_comments from review_comments
+    inner join reviews on review_comments.review_id=reviews.id
+    where reviews.resource_id=#{id}
   </delete>
 
   <delete id="deleteResourceActionPlansReviews" parameterType="long">
-    delete from action_plans_reviews apr inner join action_plans ap on ap.id=apr.action_plan_id where ap.project_id=#{id}
+    delete action_plans_reviews from action_plans_reviews
+    inner join action_plans on action_plans.id=action_plans_reviews.action_plan_id
+    where action_plans.project_id=#{id}
   </delete>
 
 </mapper>