Uploaded image for project: 'Torque'
  1. Torque
  2. TORQUE-80

Default Values with an empty string in the schema results in bad source generation for number types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.3
    • Generator
    • None

    Description

      Using a mysql database, a data type that is numerical, but has no default value results in the schema generation to have default="". This causes the om generator to create java file that are declared like int customerID = ; This causes a compile error.

      To fix, just change org.apache.torque.task.TorqueJDBCTransformTask line 308 from

      if (defValue1 != null)

      to

      if (StringUtils.isNotEmpty(defValue))

      Attachments

        Activity

          People

            tfischer Thomas Fox
            booyah Brian Telintelo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: