← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19664: minor fix, turn of lazy for a few PI properties that we always access (using AbstractEnrollmentSe...

 

------------------------------------------------------------
revno: 19664
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-07-16 11:56:40 +0700
message:
  minor fix, turn of lazy for a few PI properties that we always access (using AbstractEnrollmentService.getEnrollment), speeds up most PI queries
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.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/ProgramInstance.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml	2015-06-23 15:59:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml	2015-07-16 04:56:40 +0000
@@ -16,11 +16,9 @@
 
     <property name="lastUpdated" type="timestamp" />
 
-    <property name="dateOfIncident" column="dateofincident"
-      not-null="true" />
+    <property name="dateOfIncident" column="dateofincident" not-null="true" />
 
-    <property name="enrollmentDate" column="enrollmentdate"
-      not-null="true" />
+    <property name="enrollmentDate" column="enrollmentdate" not-null="true" />
 
     <property name="endDate" column="enddate" />
 
@@ -30,10 +28,10 @@
 
     <many-to-one name="entityInstance"
       class="org.hisp.dhis.trackedentity.TrackedEntityInstance" column="trackedentityinstanceid"
-      foreign-key="fk_programinstance_trackedentityinstanceid" />
+      foreign-key="fk_programinstance_trackedentityinstanceid" lazy="false" />
 
     <many-to-one name="program" class="org.hisp.dhis.program.Program"
-      column="programid" not-null="true" foreign-key="fk_programinstance_programid" />
+      column="programid" not-null="true" foreign-key="fk_programinstance_programid" lazy="false" />
 
     <set name="programStageInstances" order-by="executionDate,duedate">
       <key column="programinstanceid" />
@@ -54,14 +52,14 @@
         column="messageconversationid" />
     </list>
 
-    <list name="comments" table="programinstancecomments" cascade="all">
+    <list name="comments" table="programinstancecomments" cascade="all" lazy="false">
       <key column="programinstanceid" />
       <list-index column="sort_order" base="1" />
       <many-to-many column="trackedentitycommentid" unique="true" class="org.hisp.dhis.trackedentitycomment.TrackedEntityComment" />
     </list>
 
     <many-to-one name="organisationUnit" class="org.hisp.dhis.organisationunit.OrganisationUnit" column="organisationunitid"
-      foreign-key="fk_programinstance_organisationunitid" not-null="false" />
+      foreign-key="fk_programinstance_organisationunitid" not-null="false" lazy="false" />
 
     <!--<many-to-one name="comment" cascade="all"
       class="org.hisp.dhis.trackedentitycomment.TrackedEntityComment"


Follow ups