Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2021-10-13 13:012021-10-14 09:53
Reporterfernando_merinoView Statuspublic 
Assigned Tofernando_merino 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0047840: API Change: Change DESCRIPTION column from VARCHAR to NVARCHAR type in FIN_PAYMENT table

DescriptionThis problem occurs only on an Oracle database. The problem is that the DESCRIPTION column is defined as VARCHAR2(255 BYTE). The DESCRIPTION field is limited to 255 CHARACTERS long, so if all these characters don't exceed the limit of 255 BYTES there is no problem (e.g 255 characters of 1 BYTE each). The problem comes when the description contains special characters larger than 1 BYTE. If the description is a long one, for example one with 255 characters, the characters limit is not exceeded, but if it contains some characters larger than 1 BYTE, like for example the º character that occupies 2 BYTES, then the limit of 255 BYTES is exceeded (254 one-byte characters, plus one of 2 bytes make 256 bytes, which do not fit in the field defined in the database).
Steps To ReproduceUsing Oracle database:
1. Go to 'Payment in', window which makes use of FIN_PAYMENT table.
2. Create a new record and in the DESCRIPTION field input a long description reaching the limit of 255 characters and containing some characters larger than 1 BYTE, like for example the º characters. Try with this description for example --> 'This is a description example:ººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººººº'
3. Try to save the record, you will get an error similar to this one: ERROR: Saving failed. ORA-12899: value too large for column "ERP_PI_ORACLE"."FIN_PAYMENTMETHOD"."DESCRIPTION" (actual: 480, maximum: 255)
Proposed Solution1. Change column type of the DESCRIPTION field from VARCHAR to NVARCHAR
(Risk statement --> See notes)
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0047765 closedfernando_merino Problem posting multiple invoices in the same collection 

-  Notes
fernando_merino (developer)
2021-10-13 13:02

API change risk:

Risk --> small

- NVARCHAR is going to support the same data that VARCHAR was supporting. 255 characters will
continue to be the characters limit, but now special characters are allowed in long descriptions
reaching this characters limit.
- JAVA API doesn't change, the property of the DAL object will continue being treated as String type.
- Only instances using Oracle database could be affected
- Additionally, the api-check considers this change as a warning. This is the result:
 [checkAPI] 11451 [main] WARN org.openbravo.ddlutils.task.CheckAPIDistribution - +++++++++++++++++++++++++++++++++++++++++++++++++++
 [checkAPI] 11452 [main] WARN org.openbravo.ddlutils.task.CheckAPIDistribution - Warnings in API model validation
 [checkAPI] 11452 [main] WARN org.openbravo.ddlutils.task.CheckAPIDistribution - +++++++++++++++++++++++++++++++++++++++++++++++++++
 [checkAPI] 11452 [main] WARN org.openbravo.ddlutils.task.CheckAPIDistribution - Column type change from VARCHAR to NVARCHAR: column:FIN_PAYMENT.DESCRIPTION
 [checkAPI] 11452 [main] WARN org.openbravo.ddlutils.task.CheckAPIDistribution -
hgbot (developer)
2021-10-14 09:40

Merge Request created: [^]
hgbot (developer)
2021-10-14 09:53

Directly closing issue as related merge request is already approved.

Repository: [^]
Changeset: 5939c63b55ae9dd8064b49606c384b0bd1ffe006
Author: fernando_merino <>
Date: 2021-10-14T09:31:14+02:00
URL: [^]

Fixes ISSUE-47840: Change type definition of column FIN_PAYMENT from VARCHAR to NVARCHAR

Changed DESCRIPTION column type from VARCHAR to NVARCHAR so
in that way the limit of 255 bytes is not exceeded when
introducing long descriptions with characters larger than 2

M model/src-db/database/model/tables/FIN_PAYMENT.xml
hgbot (developer)
2021-10-14 09:53

Merge request merged: [^]

- Issue History
Date Modified Username Field Change
2021-10-13 13:01 fernando_merino New Issue
2021-10-13 13:01 fernando_merino Assigned To => dmitry_mezentsev
2021-10-13 13:01 fernando_merino Modules => Core
2021-10-13 13:01 fernando_merino Triggers an Emergency Pack => No
2021-10-13 13:02 fernando_merino Note Added: 0132316
2021-10-13 13:03 fernando_merino Relationship added blocks 0047765
2021-10-13 13:45 dmitry_mezentsev Tag Attached: Approved
2021-10-13 13:45 dmitry_mezentsev Assigned To dmitry_mezentsev => fernando_merino
2021-10-14 09:40 hgbot Note Added: 0132337
2021-10-14 09:53 hgbot Resolution open => fixed
2021-10-14 09:53 hgbot Status new => closed
2021-10-14 09:53 hgbot Note Added: 0132341
2021-10-14 09:53 hgbot Note Added: 0132342

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker