diff options
4 files changed, 8 insertions, 9 deletions
diff --git a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper-oracle.xml b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper-oracle.xml index 558e4a3577a..b2be3b7858d 100644 --- a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper-oracle.xml +++ b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper-oracle.xml @@ -87,7 +87,6 @@ <selectKey order="BEFORE" resultType="Long" keyProperty="id"> select projects_seq.NEXTVAL from DUAL </selectKey> - insert into projects (id, name, long_name, description, scope, qualifier, kee, language, root_id, copy_resource_id, person_id, profile_id, enabled) values ( diff --git a/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java b/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java index 26f8513367a..503056ee794 100644 --- a/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java @@ -144,13 +144,13 @@ public class ResourceDaoTest extends AbstractDaoTestCase { public void insertOrUpdate() { setupData("insertOrUpdate"); - // update because already persisted + // to be updated ResourceDto project = new ResourceDto() .setKey("org.struts:struts").setScope(Scopes.PROJECT).setQualifier(Qualifiers.PROJECT) .setName("Struts").setLongName("Apache Struts").setLanguage("java").setDescription("MVC Framework") - .setId(1L); + .setId(100L); - // insert + // to be inserted ResourceDto file1 = new ResourceDto() .setKey("org.struts:struts:org.struts.Action").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE) .setLanguage("java").setName("Action").setLongName("org.struts.Action"); @@ -163,7 +163,7 @@ public class ResourceDaoTest extends AbstractDaoTestCase { assertThat(project.getId()).isNotNull(); assertThat(file1.getId()).isNotNull(); assertThat(file2.getId()).isNotNull(); - checkTables("insertOrUpdate", "projects"); + checkTables("insertOrUpdate", new String[]{"id"}, "projects"); } } diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insertOrUpdate-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insertOrUpdate-result.xml index 668f78eed16..a1cae231f15 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insertOrUpdate-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insertOrUpdate-result.xml @@ -1,14 +1,14 @@ <dataset> - <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" + <projects root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" description="MVC Framework" long_name="Apache Struts" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> - <projects id="2" root_id="[null]" scope="FIL" qualifier="FIL" kee="org.struts:struts:org.struts.Action" name="Action" + <projects root_id="[null]" scope="FIL" qualifier="FIL" kee="org.struts:struts:org.struts.Action" name="Action" description="[null]" long_name="org.struts.Action" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> - <projects id="3" root_id="[null]" scope="FIL" qualifier="FIL" kee="org.struts:struts:org.struts.Filter" name="Filter" + <projects root_id="[null]" scope="FIL" qualifier="FIL" kee="org.struts:struts:org.struts.Filter" name="Filter" description="[null]" long_name="org.struts.Filter" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insertOrUpdate.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insertOrUpdate.xml index 10fdddc66ff..1a5e2978a07 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insertOrUpdate.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insertOrUpdate.xml @@ -1,6 +1,6 @@ <dataset> - <projects id="1" root_id="200" scope="PRJ" qualifier="TRK" kee="old key" name="old name" + <projects id="100" root_id="200" scope="PRJ" qualifier="TRK" kee="old key" name="old name" description="old name" long_name="old long name" enabled="[false]" language="old" copy_resource_id="2" person_id="3" profile_id="4"/> |