------------------------------------------------------------
revno: 20277
committer: Morten Olav Hansen <morte...@gmail.com>
branch nick: dhis2
timestamp: Tue 2015-09-22 11:27:04 +0700
message:
  minor bugfix for TEI search
modified:
  
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.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/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2015-09-16 18:31:45 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2015-09-22 04:27:04 +0000
@@ -170,16 +170,16 @@
                 {
                     String filter = queryFilter.getSqlFilter( StringUtils.lowerCase( queryFilter.getFilter() ) );
 
-                    hql += " and exists (from TrackedEntityAttributeValue teav where teav.entityInstance=tei";
+                    hql += hlp.whereAnd() + " exists (from TrackedEntityAttributeValue teav where teav.entityInstance=tei";
                     hql += " and teav.attribute.uid='" + queryItem.getItemId() + "'";
 
                     if ( queryItem.isNumeric() )
                     {
-                        hql += " and teav.value " + queryFilter.getSqlOperator() + filter + ")";
+                        hql += " and teav.value" + queryFilter.getSqlOperator() + filter + ")";
                     }
                     else
                     {
-                        hql += " and lower(teav.value) " + queryFilter.getSqlOperator() + filter + ")";
+                        hql += " and lower(teav.value)" + queryFilter.getSqlOperator() + filter + ")";
                     }
 
                 }

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to