]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
No need in merging user by cascade from ConributorRelation.
authorrkv <rkv@opencascade.com>
Mon, 18 Mar 2013 11:05:12 +0000 (11:05 +0000)
committerrkv <rkv@opencascade.com>
Mon, 18 Mar 2013 11:05:12 +0000 (11:05 +0000)
Workspace/Siman-Common/src/org/splat/dal/bo/som/Relations.hbm.xml
Workspace/Siman-Common/src/test/splat/service/TestStudyService.java

index 9a42aa9f3ecf862b7d9dd95c73fe9515bf30b362..9d07158f9c6b3788f19be0b792a03b732dc32df3 100644 (file)
 <!-- Contributor actor relation: Study to User
   -->
     <union-subclass name="org.splat.dal.bo.som.ContributorRelation" extends="org.splat.dal.bo.kernel.Relation" table="contributor_rel">
-        <many-to-one cascade="merge" name="refer" column="refer" access="field" not-null="true" />
+        <many-to-one name="refer" column="refer" access="field" not-null="true" />
+<!--         <many-to-one cascade="all-delete-orphan" unique="true" name="refer" column="refer" access="field" not-null="true" />
+ -->
     </union-subclass>
 
 <!-- ValidationCycle relation: Study to ValidationCycle
   -->
     <union-subclass name="org.splat.dal.bo.som.ValidationCycleRelation" extends="org.splat.dal.bo.kernel.Relation" table="cycle_rel">
         <many-to-one name="refer" column="refer" unique="true" cascade="all-delete-orphan" access="field" not-null="true" />
-               <!-- <many-to-one cascade="merge" name="refer" column="refer" unique="true" access="field" not-null="true" />-->
+               <!-- <many-to-one name="refer" column="refer" unique="true" access="field" not-null="true" />-->
     </union-subclass>
 
 <!-- Stamp relation: Document to Timestamp
index dc2e30306ef8e9b21e29782801c61429b0f9c64c..3776ef1840289f3b7fe3f2c014a091f94e9c5fc8 100644 (file)
@@ -827,6 +827,12 @@ public class TestStudyService extends BaseTest {
 
                // /////////////////////////////////////////////////////////
                ht.clear();
+               // Check removal of contributors relation
+               List found1 = ht.find("from ContributorRelation where owner=" + studyId);
+               Assert.assertEquals(found1.size(), 1,
+                               "ContributorRelation is not created");
+               ht.clear();
+               
                _studyService.removeStudy(studyId);
                ht.flush();