← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20554: minor cascade change in ProgramStage, needed for proper save/update of circular references

 

------------------------------------------------------------
revno: 20554
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-10-07 12:15:49 +0700
message:
  minor cascade change in ProgramStage, needed for proper save/update of circular references
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml	2015-10-07 02:50:55 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml	2015-10-07 05:15:49 +0000
@@ -26,7 +26,7 @@
 
     <property name="irregular" column="irregular" />
 
-    <set name="programStageDataElements" order-by="sort_order">
+    <set name="programStageDataElements" order-by="sort_order" cascade="save-update">
       <key column="programstageid" />
       <one-to-many class="org.hisp.dhis.program.ProgramStageDataElement" />
     </set>
@@ -36,7 +36,7 @@
 
     <property name="standardInterval" />
 
-    <set name="programStageSections" order-by="sortOrder" cascade="all,delete-orphan">
+    <set name="programStageSections" order-by="sortOrder" cascade="save-update">
       <key column="programstageid" />
       <one-to-many class="org.hisp.dhis.program.ProgramStageSection" />
     </set>