From d57a8cca31e1ed5d341c20d2a61dd267ddec239e Mon Sep 17 00:00:00 2001 From: rkv Date: Fri, 19 Apr 2013 16:04:33 +0000 Subject: [PATCH] Fix for correct search of study result document type in Postgres. --- .../Siman-Common/src/org/splat/service/StudyServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java index 5657ba5..67a95e5 100644 --- a/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java @@ -1563,7 +1563,8 @@ public class StudyServiceImpl implements StudyService { @Transactional(readOnly = true) public DocumentType getStudyResultType(final Study study) { DetachedCriteria query = DetachedCriteria.forClass(DocumentType.class) - .addOrder(Order.desc("result")); + .add(Restrictions.isNotNull("result")).addOrder( + Order.desc("result")); return getDocumentTypeDAO().getFirstResult(query); } -- 2.39.2