Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012212Openbravo ERPA. Platformpublic2010-02-10 16:542010-03-12 22:41
networkb 
marvintm 
highminoralways
closedfixed 
5
2.50MP11 
2.50MP142.50MP14 
Core
No
0012212: update database fails when object name is longer than 30 characters
When the name of your object is longer than 30 characters, export.database works fine but update.database fails.
I attach a module defined as:
* dependent of core
* DB prefix of 4 characters length (MDRTG)
which adds column "Potentiallifetimevalue" (located in table c_bpartner) to table ad_alert.
As DBColumnName should be "EM_Mdrtg_Potentiallifetimevalue" (31 characters long), if you try to install the module you will get the error.
No tags attached.
? org.openbravo.retegi-1.0.0.obx (5,182) 2010-02-10 16:54
https://issues.openbravo.com/file_download.php?file_id=2199&type=bug
Issue History
2010-02-10 16:54networkbNew Issue
2010-02-10 16:54networkbAssigned To => alostale
2010-02-10 16:54networkbFile Added: org.openbravo.retegi-1.0.0.obx
2010-02-11 11:20alostaleStatusnew => scheduled
2010-02-11 11:20alostaleAssigned Toalostale => marvintm
2010-02-11 11:20alostalefix_in_branch => pi
2010-02-25 17:07marvintmNote Added: 0024823
2010-02-25 17:40hgbotCheckin
2010-02-25 17:40hgbotNote Added: 0024825
2010-02-25 17:40hgbotStatusscheduled => resolved
2010-02-25 17:40hgbotResolutionopen => fixed
2010-02-25 17:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/33950fa7447d42ab0d953c9d83cee18893c684e2 [^]
2010-03-08 16:06jpabloaeTarget Version2.50MP13 => 2.50MP14
2010-03-09 17:36hgbotCheckin
2010-03-09 17:36hgbotNote Added: 0025184
2010-03-09 17:59shuehnerNote Added: 0025185
2010-03-09 17:59shuehnerStatusresolved => closed
2010-03-09 17:59shuehnerFixed in Version => 2.50MP14
2010-03-10 17:23anonymoussf_bug_id0 =>
2010-03-10 18:29anonymoussf_bug_id => 2968045
2010-03-12 22:39hudsonbotCheckin
2010-03-12 22:39hudsonbotNote Added: 0025324
2010-03-12 22:41hudsonbotCheckin
2010-03-12 22:41hudsonbotNote Added: 0025411

Notes
(0024823)
marvintm   
2010-02-25 17:07   
The real issue is not that update.database didn't work with an object which is more than 30 characters. Openbravo doesn't support more than 30 characters for a database object, because the Oracle database doesn't allow it.

The issue is that export.database didn't complain when the object was exported in the first place.

The validation in export.database is going to be changed to detect this problem.
(0024825)
hgbot   
2010-02-25 17:40   
Repository: erp/devel/pi
Changeset: 33950fa7447d42ab0d953c9d83cee18893c684e2
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Feb 25 17:10:53 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/33950fa7447d42ab0d953c9d83cee18893c684e2 [^]

Fixed issue 12212. Validation was changed so that if somebody tries to export a database object which is more than 30 characters long, an error will be raised.

---
M src/org/openbravo/service/system/DatabaseValidator.java
M src/org/openbravo/service/system/SystemValidationResult.java
---
(0025184)
hgbot   
2010-03-09 17:36   
Repository: erp/devel/pi
Changeset: 2b0ab921b30adb4fdfb802d18408848fe227c4dd
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Mar 09 17:41:29 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2b0ab921b30adb4fdfb802d18408848fe227c4dd [^]

Related to issue 12212. Fixed corner case (column belonging to one module added to a table which belongs to a different module). The messages will also show the table name when relevant.

---
M src/org/openbravo/service/system/DatabaseValidator.java
---
(0025185)
shuehner   
2010-03-09 17:59   
oracle won't allow db-objects with name >30chars, but now the export.database validates this length constraint and stops with an error, so case won't happen for new developments/modules.
(0025324)
hudsonbot   
2010-03-12 22:39   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/33950fa7447d [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/631c626866c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16685.obx [^]
(0025411)
hudsonbot   
2010-03-12 22:41   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/2b0ab921b30a [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/631c626866c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16685.obx [^]