OpenJPA
  1. OpenJPA
  2. OPENJPA-745

Sybase by default silently truncates a string which is longer than the column length without raising an exception

    Details

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

      Description

      By default, Sybase silently truncates a string which is longer than the column length without raising an exception. To override this behavior, string_rtruncation must be set on. In order to be consistent with other databases (which raise exceptions when a string length is longer than the column length), we will set string_rtruncation on by default for Sybase. For an application that wants to keep Sybase silent truncation behavior, a DBDictionary property "setStringRightTruncationOn" is introduced. When it is set to false in the persistence.xml, the string will be silently truncated during insert/update.

      1. OPENJPA-745-1.patch
        3 kB
        Fay Wang
      2. OPENJPA-745.patch
        3 kB
        Fay Wang

        Issue Links

          Activity

          Fay Wang created issue -
          Fay Wang made changes -
          Field Original Value New Value
          Summary Sybase by default silently truncation a string which is longer than the column length without raising an exception Sybase by default silently truncates a string which is longer than the column length without raising an exception
          Description By default, Sybase silently truncates a string which is longer than the column length without raising an exception. To overwrite this behavior, string_rtruncation must be set on. In order to be consistent with other databases, we will set string_rtruncation on as a default. If the application wants to keep Sybase silent truncation behavior, it has to set this property to false. A DBDictionary property "setStringRightTruncationOn" is instroduced so that application can set it to false in the persistence.xml. By default, Sybase silently truncates a string which is longer than the column length without raising an exception. To override this behavior, string_rtruncation must be set on. In order to be consistent with other databases, we will set string_rtruncation on as a default. If the application wants to keep Sybase silent truncation behavior, it has to set this property to false. A DBDictionary property "setStringRightTruncationOn" is instroduced so that application can set it to false in the persistence.xml.
          Fay Wang made changes -
          Description By default, Sybase silently truncates a string which is longer than the column length without raising an exception. To override this behavior, string_rtruncation must be set on. In order to be consistent with other databases, we will set string_rtruncation on as a default. If the application wants to keep Sybase silent truncation behavior, it has to set this property to false. A DBDictionary property "setStringRightTruncationOn" is instroduced so that application can set it to false in the persistence.xml. By default, Sybase silently truncates a string which is longer than the column length without raising an exception. To override this behavior, string_rtruncation must be set on. In order to be consistent with other databases (which raise exceptions when a string length is longer than the column length), we will set string_rtruncation on by default for Sybase. For an application that wants to keep Sybase silent truncation behavior, a DBDictionary property "setStringRightTruncationOn" is introduced. When it is set to false in the persistence.xml, the string will be silently truncated during insert/update.
          Fay Wang made changes -
          Attachment OPENJPA-745.patch [ 12392111 ]
          Pinaki Poddar made changes -
          Link This issue relates to OPENJPA-750 [ OPENJPA-750 ]
          Fay Wang made changes -
          Attachment OPENJPA-745-1.patch [ 12392494 ]
          Fay Wang made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Donald Woods made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development