openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Logemann (JIRA)" <>
Subject [jira] Created: (OPENJPA-1813) CURRENT_DATE seems broken
Date Thu, 23 Sep 2010 18:59:32 GMT
CURRENT_DATE seems broken

                 Key: OPENJPA-1813
             Project: OpenJPA
          Issue Type: Bug
          Components: query
    Affects Versions: 2.0.1
            Reporter: Marc Logemann

the following query:

Query query = em.createQuery("select count(d) from Order o, IN(o.deliveryAddress) d where
o.createdYmd = CURRENT_DATE and d.deliveryMode = ?1");

generates the following SQL:

SELECT COUNT(t1.oid) FROM orders t0 INNER JOIN address t1 ON t0.oid = t1.order_oid WHERE (t0.createdymd
IS NULL AND t1.deliverymode = ?) [params=?]

Why the where part with "IS NULL" ? Current_date should be applied there shouldnt it?

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

View raw message