Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
05/13/08 08:13:12 (3 months ago)
Author:
catullus
Message:

Deprecated findObsByGroupId and changed it to work by searching by the id of the obsGroup.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/trunk/src/api/org/openmrs/api/db/hibernate/HibernateObsDAO.java

    r4158 r4190  
    356356        /** 
    357357         * @see org.openmrs.api.db.ObsDAO#findObsByGroupId(java.lang.Integer) 
     358         * @deprecated -- should use obs.getGroupMembers 
    358359         */ 
    359360        @SuppressWarnings("unchecked") 
     
    361362                Criteria criteria = sessionFactory.getCurrentSession().createCriteria( 
    362363                                Obs.class); 
    363                 criteria.add(Restrictions.eq("obsGroupId", obsGroupId)); 
     364                criteria.createAlias("obsGroup", "og"); 
     365                criteria.add(Restrictions.eq("og.obsId", obsGroupId)); 
    364366                return criteria.list(); 
    365367        }