Derby
  1. Derby
  2. DERBY-5629

Queries with guarded null Parameter fail

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 10.8.2.2
    • Fix Version/s: None
    • Component/s: JDBC
    • Environment:
      java version "1.6.0_30"
      Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
      Java HotSpot(TM) Client VM (build 20.5-b03, mixed mode, sharing)
    • Urgency:
      Normal
    • Issue & fix info:
      Repro attached

      Description

      Some test cases in the attached Maven project fail where a null parameter is passed in or a null value is coded in the query.

      In the context of this issue, a recently closed issue appears to be relevant:

      "Add support for setObject(<arg>, null)"
      https://issues.apache.org/jira/browse/DERBY-1938

      Some test cases in the attached project are Hibernate JPQL cases where Hibernate takes care of generating the SQL queries.

      I thought it was appropriate to make a few cases not only one so that the issue gets a little more test coverage.

      I also assume that issue DERBY-1938 aims to fix what we can see in these cases.

      This has become a major issue because it causes failure of a minimalistic JPQL query as shown at

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

      that shows a JPQL query:

      SELECT a FROM Author a WHERE :lastName IS NULL OR LOWER(a.lastName) = :lastName

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Bernard
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development