← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5867: Fixed bug <92746> Data elements without a data set violent.

 

------------------------------------------------------------
revno: 5867
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-02-06 16:32:02 +0700
message:
  Fixed bug <92746> Data elements without a data set violent.
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.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/dataelement/hibernate/HibernateDataElementStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java	2012-02-06 09:32:02 +0000
@@ -210,9 +210,9 @@
     @SuppressWarnings( "unchecked" )
     public Collection<DataElement> getDataElementsWithoutDataSets()
     {
-        String hql = "from DataElement d where d.dataSets.size = 0";
+        String hql = "from DataElement d where d.dataSets.size = 0 and d.domainType =:domainType";
 
-        return getQuery( hql ).setCacheable( true ).list();
+        return getQuery( hql ).setParameter( "domainType", "aggregate" ).setCacheable( true ).list();
     }
 
     @SuppressWarnings( "unchecked" )