Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1813

CURRENT_DATE seems broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.1
    • None
    • query
    • None

    Description

      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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            logemann Marc Logemann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: