]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
Fix for correct search of study result document type in Postgres.
authorrkv <rkv@opencascade.com>
Fri, 19 Apr 2013 16:04:33 +0000 (16:04 +0000)
committerrkv <rkv@opencascade.com>
Fri, 19 Apr 2013 16:04:33 +0000 (16:04 +0000)
Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java

index 5657ba53c9d3aefd859f902a2283aec58a2e91eb..67a95e5828ab2ac2e2d5f147737771acf5d3255c 100644 (file)
@@ -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);
        }