Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-15391

Support for Oracle JDBC connection properties Ex: fixedString

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: General Backlog
    • Component/s: Data:JDBC
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      Oracle JDBC Connection property fixedString has some significant behavior only when we use PraparedStatement.setObject() is invoked with String value & with UNKNOWN SQL Type.

      But this will never happens because of the following code in setValue() method of StatementCreatorUtils.java.

      else if (sqlType == SqlTypeValue.TYPE_UNKNOWN) {

      if (isStringValue(inValue.getClass()))

      { ps.setString(paramIndex, inValue.toString()); }

      else if (isDateValue(inValue.getClass()))

      { ps.setTimestamp(paramIndex, new java.sql.Timestamp(((java.util.Date) inValue).getTime())); }

      else if (inValue instanceof Calendar)

      { Calendar cal = (Calendar) inValue; ps.setTimestamp(paramIndex, new java.sql.Timestamp(cal.getTime().getTime()), cal); }

      else

      { // Fall back to generic setObject call without SQL type specified. ps.setObject(paramIndex, inValue); }

      }
      I think we need to fix this with some special datatype or with special else block code.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              vk_kopuri Venkata Krishna
              Last updater:
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Days since last comment:
                3 years, 29 weeks, 6 days ago