Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-686

Openjpa manual needs to be updated for database restriction on BigDecimal field on Sybase

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.3, 1.1.0, 1.2.0
    • Fix Version/s: 1.2.1, 1.3.0
    • Component/s: None
    • Labels:
      None

      Description

      Applications performing update/insert data of the BigDecimal java type may fail with OptimisticException if the the
      data exceeds the scale or precision of the db column on Sybase,.

      The Sybase behavior is working as documented, as shown in the following link:
      http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__BookTextView/3524;pt=693/*

      In Openjpa, it is not possible to specify precision/scale for the column mapped by a BigDecimal type.
      However, applications can specify the plugin value for the column type mapped by the BigDecimal java type:
      http://openjpa.apache.org/docs/latest/manual/manual.html#openjpa.jdbc.DBDictionary
      to avoid this trunction error problem.

      It is desirable to update the "database restrictions" section of the openjpa manual for this Sybase-specific trunction problem.

        Activity

        Hide
        faywang Fay Wang added a comment -

        The attached patch contains the update on the openjpa manual for this problem.

        Show
        faywang Fay Wang added a comment - The attached patch contains the update on the openjpa manual for this problem.

          People

          • Assignee:
            faywang Fay Wang
            Reporter:
            faywang Fay Wang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development