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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7-beta-1
    • 1.7-rc-1
    • SQL processing
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: