Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3809

Sql.Dataset: Values are converted to string causing errors when inserting dates

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7-beta-1
    • Fix Version/s: 1.7-rc-1
    • Component/s: SQL processing
    • Labels:
      None

      Description

      Testcase:

      myMap = [EMPNO: 10, HIREDATE: Date.parse("yyyy-MM-dd", "1982-12-25")]
      dbSet.add myMap

      This results in:
      WARNING: Failed to add row for:

      {EMPNO=10, HIREDATE=Sat Dec 25 00:00:00 CET 1982}

      java.sql.SQLException: Invalid column type

      The database does not recognize this date format.
      The add() method should use the values as a bind variable without converting them to string.

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              albatross Albatross
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: