Derby
  1. Derby
  2. DERBY-1863

SQL NULL always represented as zero when mapping an INTEGER column to a Java int or Integer field using a EOD query object extended from BaseQuery

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 10.2.1.6, 10.3.1.4
    • Fix Version/s: None
    • Component/s: JDBC
    • Labels:
      None
    • Environment:
      Mustang b98

      Description

      SQL INTEGER column mapped to a Java primitive int field resulted in the filed set to zero when the SQL value was NULL.
      This means there is no way to tell if the field was NULL or not. I was expecting some error, either at "mapping" time or at exection time.

      SQL INTEGER column mapped to a Java java.lang.Integer field resulted in the filed set to zero when the SQL value was NULL.
      Was expecting the field to be set to Java null. Note for VARCHAR columns mapped to a String field, the result is Java null when the SQL value is NULL.

      JDBC 4.0 spec seems silent on the expected behaviour for @Select queries and the column mapping when the SQL value is NULL.

        Activity

        Daniel John Debrunner created issue -
        Daniel John Debrunner made changes -
        Field Original Value New Value
        Environment Mustang b98
        Hide
        Daniel John Debrunner added a comment -

        EoD is being dropped from JDBC 4.

        Show
        Daniel John Debrunner added a comment - EoD is being dropped from JDBC 4.
        Daniel John Debrunner made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Gavin made changes -
        Workflow jira [ 12383966 ] Default workflow, editable Closed status [ 12798150 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        17d 20h 47m 1 Daniel John Debrunner 06/Oct/06 18:43

          People

          • Assignee:
            Unassigned
            Reporter:
            Daniel John Debrunner
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development