Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-31232

Very-long ofbiz field-type can not be validated correctly in Oracle databases

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Currently, the oracle field definition for this type is as follows:

      <field-type-def type="very-long" sql-type="VARCHAR2(4000)" java-type="String"></field-type-def>

      This constrains the column to 4000 BYTES. In other databases it is fine as we have mapped the type to a column that can fit 4000 CHARACTERS.

      In Oracle, this is specially tricker as VARCHAR2 con hold only a maximum of 4000 BYTES. Consequently, strings containing multi-bye characters might not fit in the column which will generate a nasty unexpected SQLException on insert or update.

      Given the current state of affairs it is very difficult for UI/Application layer to validate whether the data entered by the user will fit the column in Oracle as it will depend on the number of bytes in it and this will be different in other database (i.e. data input valid for a MySQL will not be valid under Oracle)

      Workaround:

      • None

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: