Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0013921 | Openbravo ERP | Y. DBSourceManager | public | 2010-07-08 13:05 | 2010-08-12 00:00 |
|
Reporter | networkb | |
Assigned To | marvintm | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 20 | OS Version | Community Appliance |
Product Version | 2.50MP19 | |
Target Version | 2.50MP22 | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | OBPS |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0013921: The message error is wrong when a column belong to the same module that table and name start with EM |
Description | When you create a column with name EM_DBPREFIX_NAMECOLUMN, and the column belong to the same module that table, when you run export.database the message error is:
Errors for Validation type: NOT_EXIST_IN_DB
Column NAMETABLE.EM_DBPREFIX_NAMECOLUMN defined in the Application Dictionary but not present in the database.
This error is wrong, because the column is defined in database. |
Steps To Reproduce | . create a new table belong to module "M" (prefix database DBPREFIX), with a column "EM_DBPREFIX_COL1".
. create in application dictionary this table and columns. All columns belong to module "M".
. run export.database
. error is returned |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2010-07-08 13:05 | networkb | New Issue | |
2010-07-08 13:05 | networkb | Assigned To | => marvintm |
2010-07-08 13:05 | networkb | OBNetwork customer | => Yes |
2010-07-12 08:54 | alostale | Status | new => scheduled |
2010-07-29 13:16 | marvintm | Note Added: 0029665 | |
2010-07-29 13:17 | marvintm | Note Edited: 0029665 | bug_revision_view_page.php?bugnote_id=0029665#r629 |
2010-07-29 13:19 | hgbot | Checkin | |
2010-07-29 13:19 | hgbot | Note Added: 0029666 | |
2010-07-29 13:19 | hgbot | Status | scheduled => resolved |
2010-07-29 13:19 | hgbot | Resolution | open => fixed |
2010-07-29 13:19 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/a3213b55a054628c5424e76800c5f617d746d8be [^] |
2010-07-30 19:32 | hudsonbot | Checkin | |
2010-07-30 19:32 | hudsonbot | Note Added: 0029720 | |
2010-07-30 19:36 | hudsonbot | Checkin | |
2010-07-30 19:36 | hudsonbot | Note Added: 0029726 | |
2010-08-11 11:22 | iperdomo | Note Added: 0029884 | |
2010-08-11 11:23 | iperdomo | Note Added: 0029885 | |
2010-08-11 11:23 | iperdomo | Status | resolved => closed |
2010-08-12 00:00 | anonymous | sf_bug_id | 0 => 3043342 |
Notes |
|
(0029665)
|
marvintm
|
2010-07-29 13:16
(edited on: 2010-07-29 13:17) |
|
Important note: it is wrong to name a column EM_dbprefix_mycolumn if the dbprefix is the one from the module which owns the table (as EM means External Module). In that case, mycolumn should just be used as the column name.
However, it is true that the validation message is not clear at all, and doesn't warn you of this fact. Therefore, we are going to improve the message so that this problem is shown more precisely.
|
|
|
(0029666)
|
hgbot
|
2010-07-29 13:19
|
|
Repository: erp/devel/pi
Changeset: a3213b55a054628c5424e76800c5f617d746d8be
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Jul 29 13:17:26 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a3213b55a054628c5424e76800c5f617d746d8be [^]
Fixed issue 13921. Improved validation so that the message is clearer
We haven't changed the naming rule used to infer the owner of a database column. Therefore, a column which starts with EM_dbprefix needs to use a dbprefix of a _different_ module from the one which owns the table (this makes sense, as EM means External Module). However, we have changed the message so that now it warns of this rule in case the column starts with EM_dbprefix and is missing in the physical model.
---
M src/org/openbravo/service/system/DatabaseValidator.java
---
|
|
|
|
|
|
|
|
|
|
The new message is:
[exportdatabase] +++++++++++++++++++++++++++++++++++++++++++++++++++
[exportdatabase] Errors for Validation type: NOT_EXIST_IN_DB
[exportdatabase] +++++++++++++++++++++++++++++++++++++++++++++++++++
[exportdatabase] Column OBISSUE_Test1.EM_Obissue_Name defined in the Application Dictionary but not present in the database. The problem could also be that the column name has a dbprefix of a non existant module or that it starts with the dbprefix of the module which owns the table. In this second case, the column doesn't need the 'EM_DBPREFIX' prefix, you can use the name you want. |
|
|
|
Tested on pi @ rev a45ffdf7b265 |
|