dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #37088
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18966: Event query, basing the query on trackedentityinstance table and using inner joins
------------------------------------------------------------
revno: 18966
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-04-21 18:11:31 +0200
message:
Event query, basing the query on trackedentityinstance table and using inner joins
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java 2015-04-21 15:09:13 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java 2015-04-21 16:11:31 +0000
@@ -213,10 +213,10 @@
"psinote.trackedentitycommentid as psinote_id, psinote.commenttext as psinote_value, " +
"psinote.createddate as psinote_storeddate, psinote.creator as psinote_storedby, " +
"pdv.value as pdv_value, pdv.storedby as pdv_storedby, pdv.providedelsewhere as pdv_providedelsewhere, de.uid as de_uid, de.code as de_code " +
- "from program p " +
- "left join programstage ps on ps.programid=p.programid " +
- "left join programstageinstance psi on ps.programstageid=psi.programstageid " +
- "left join programinstance pi on pi.programinstanceid=psi.programinstanceid " +
+ "from programstageinstance psi " +
+ "inner join programinstance pi on pi.programinstanceid=psi.programinstanceid " +
+ "inner join program p on p.programid=pi.programid " +
+ "inner join programstage ps on ps.programid=p.programid " +
"left join programstageinstancecomments psic on psi.programstageinstanceid=psic.programstageinstanceid " +
"left join trackedentitycomment psinote on psic.trackedentitycommentid=psinote.trackedentitycommentid ";
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java 2015-03-03 16:54:51 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java 2015-04-21 16:11:31 +0000
@@ -180,8 +180,7 @@
{
if ( !organisationUnit.hasLevel() )
{
- organisationUnit
- .setLevel( organisationUnitService.getLevelOfOrganisationUnit( organisationUnit.getId() ) );
+ organisationUnit.setLevel( organisationUnitService.getLevelOfOrganisationUnit( organisationUnit.getId() ) );
}
}