openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vera Filippova (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1794) Result of aggregate function MAX is 0 on empty table (instead of NULL).
Date Wed, 15 Sep 2010 09:09:32 GMT
Result of aggregate function MAX is 0 on empty table (instead of NULL).
-----------------------------------------------------------------------

                 Key: OPENJPA-1794
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1794
             Project: OpenJPA
          Issue Type: Bug
          Components: query
    Affects Versions: 2.0.0
            Reporter: Vera Filippova


Below is a snippet of a test case... the max should be null, but is zero.

            Object count = em.createQuery("Select count(p.pk) from Entity1 p where 1=1").getSingleResult();
            Object max = em.createQuery("Select max(p.pk) from Entity1 p where 1=1").getSingleResult();
            System.out.println("count:"+count+ " max:"+max);

            > count:0 max:0


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message