dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #37280
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19082: apply event ordering once all the joins are made
------------------------------------------------------------
revno: 19082
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-05-04 10:58:19 +0200
message:
apply event ordering once all the joins are made
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.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-30 15:32:44 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JdbcEventStore.java 2015-05-04 08:58:19 +0000
@@ -203,9 +203,10 @@
*/
private String buildSql( EventSearchParams params, List<OrganisationUnit> organisationUnits )
{
- String sql = "select * from (";
+ String sql = "select * from ((";
sql += getEventSelectQuery( params, organisationUnits );
+
sql += getEventPagingQuery( params );
sql += ") as event left join (";
@@ -218,6 +219,8 @@
sql += ") as cm on event.psi_id=cm.psic_id";
+ sql += ") order by psi_uid desc ";
+
return sql;
}
@@ -341,7 +344,7 @@
private String getEventPagingQuery( EventSearchParams params )
{
- String sql = "order by psi.programstageinstanceid desc ";
+ String sql = " ";
if ( params.isPaging() )
{