Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5728

Add Support for NULL IS NULL

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 10.8.2.2
    • None
    • SQL
    • Windows XP
      java version "1.6.0_31"
      Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
      Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)
    • Urgent

    Description

      The following query fails:

      SELECT ID FROM CUSTOMER WHERE ((NULL IS NULL) OR (NAME = NULL))

      Why this is an issue?

      At least two major Java ORMs, Hibernate JPA and EclipseLink JPA have isues with generating SQL for trivial JPQL queries such as:

      select object(c) from Customer c where ((name: is null) or (c.name = name)

      where name: is a parameter

      For why this is a fundamental issue, please see a minimalistic JPQL query at

      http://en.wikipedia.org/wiki/Java_Persistence_Query_Language#Examples

      Part of this has already been resolved by issue "Add support for setObject(<arg>, null)"
      https://issues.apache.org/jira/browse/DERBY-1938

      Please see EclipseLink and Hibernate test cases for verification.

      Attachments

        1. NullParameterEclipseLinkDerbyMaven.zip
          8 kB
          bernard
        2. NullParameterHibernateDerbyMaven.zip
          7 kB
          bernard
        3. Bug5728.java
          2 kB
          Richard N. Hillegas

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bht@actrix.gen.nz bernard
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: