dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34253
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17584: Improve approval query time.
------------------------------------------------------------
revno: 17584
committer: jimgrace@xxxxxxxxx
branch nick: dhis2
timestamp: Tue 2014-11-25 14:23:03 -0500
message:
Improve approval query time.
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java
--
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/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java 2014-11-25 11:51:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalStore.java 2014-11-25 19:23:03 +0000
@@ -286,7 +286,7 @@
for ( int i = 1; i < orgUnitLevel; i++ )
{
- joinAncestors += "left join _orgunitstructure o" + i + " on o" + i + ".idlevel" + orgUnitLevel + " = o.organisationunitid and o" + i + ".idlevel" + i + " = coo.organisationunitid ";
+ joinAncestors += "left join _orgunitstructure o" + i + " on o" + i + ".organisationunitid = o.organisationunitid and o" + i + ".idlevel" + i + " = coo.organisationunitid ";
testAncestors += "or o" + i + ".organisationunitid is not null ";
}