← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16468: replace all, delete-orphan with save-update in Program.hbm.xml

 

------------------------------------------------------------
revno: 16468
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-08-21 17:12:43 +0700
message:
  replace all,delete-orphan with save-update in Program.hbm.xml
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/Program.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-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java	2014-08-14 08:39:46 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java	2014-08-21 10:12:43 +0000
@@ -436,7 +436,6 @@
                     programTrackedEntityAttributeSet.add( trackedEntityAttribute );
                 }
 
-                sessionFactory.getCurrentSession().flush();
                 programTrackedEntityAttributes.clear();
                 sessionFactory.getCurrentSession().flush();
             }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml	2014-08-14 09:06:03 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml	2014-08-21 10:12:43 +0000
@@ -49,7 +49,7 @@
 
     <property name="onlyEnrollOnce" />
 
-    <list name="programAttributes" cascade="all,delete-orphan">
+    <list name="programAttributes" cascade="save-update">
       <key column="programid" />
       <list-index column="sort_order" base="1" />
       <one-to-many class="org.hisp.dhis.program.ProgramTrackedEntityAttribute" />
@@ -63,8 +63,7 @@
         column="userroleid" foreign-key="fk_program_userroles" />
     </set>
 
-    <set name="instanceReminders" order-by="daysAllowedSendMessage"
-      cascade="all">
+    <set name="instanceReminders" order-by="daysAllowedSendMessage" cascade="all">
       <key column="programid" />
       <one-to-many class="org.hisp.dhis.trackedentity.TrackedEntityInstanceReminder" />
     </set>