Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0006847Openbravo ERP00. Application dictionarypublic2009-01-12 14:052009-04-21 12:36
iciordia 
mtaal 
highmajoralways
closedfixed 
5any
pi 
 
No
Core
No
0006847: ad_table.classname should be mandatory and a validation should be added to avoid clashes in ad_table.name
There are around 50 tables with classname set to null. Additionally, a validation should be added to avoid clashes in ad_table.name from different modules (force to use db_prefix?)
No tags attached.
has duplicate defect 0006842 closed mtaal Entity Names of new tables in a module should be prefixed 
Issue History
2009-01-12 14:05iciordiaNew Issue
2009-01-12 14:05iciordiaAssigned To => mtaal
2009-01-12 14:05iciordiasf_bug_id0 => 2501307
2009-01-12 14:05iciordiaOBNetwork customer => No
2009-01-12 14:05iciordiaRegression testing => No
2009-01-12 14:23mtaalNote Added: 0012111
2009-01-12 20:20iciordiaNote Added: 0012130
2009-01-12 20:42mtaalNote Added: 0012132
2009-01-13 15:31mtaalNote Added: 0012148
2009-01-13 21:46mtaalNote Added: 0012161
2009-01-13 21:58mtaalRelationship addedhas duplicate 0006842
2009-01-15 16:04svnbotCheckin
2009-01-15 16:04svnbotNote Added: 0012221
2009-01-15 16:04svnbotStatusnew => resolved
2009-01-15 16:04svnbotResolutionopen => fixed
2009-01-15 16:04svnbotsvn_revision => 11937
2009-04-21 12:36psarobeStatusresolved => closed

Notes
(0012111)
mtaal   
2009-01-12 14:23   
Hi Ismael,
Regarding classname, I think for classname we don't need to add dbprefix. The combination of classname and package should be unique (the ad_package.javaname is already unique). So this would be an additional constraint next to classname not null.

For the entityname (used in xml and such) there is no class/package name so there we can use the dbprefix.

Let me know what you think.

gr. Martin
(0012130)
iciordia   
2009-01-12 20:20   
Hi Martin,

if you review the bug description I did I was reporting two bugs:
-classname should be mandatory
-name (entityName) should be unique across modules

So we are in synch ;-)

Additionally it is needed to review current values for EntityNames (name) because there is no rule to define this name (some times DB_Prefix is used, some times not, etc.)

Ismael
(0012132)
mtaal   
2009-01-12 20:42   
Some additional points:
- check current ad_table.name for incorrect values
- write to developers list about correct use of name, tablename and classname fields and relation to ad_package
(0012148)
mtaal   
2009-01-13 15:31   
The following changes have been made:
- checked and corrected ad_table.name
- set ad_table.classname for the ones which were null
- updated referencedata
- various changes in the code to follow the changes in the generated entities

Changes have been tested by a successfull ant install.source

To be done:
- add trigger to check for prefix of module in ad_table.name
- further update of package of ad_table records on the basis of reaction of Ismael
(0012161)
mtaal   
2009-01-13 21:46   
Done:
- The trigger was already defined, so no extra validation required.
- An email has been sent to the developers list about the use of AD_Table.classname, name and ad_package_id

Open topic:
- Waiting for reaction of Ismael on packaging of several tables

Work on this issue continues after this info has been received.
(0012221)
svnbot   
2009-01-15 16:04   
Repository: openbravo
Revision: 11937
Author: mtaal
Date: 2009-01-15 16:03:45 +0100 (Thu, 15 Jan 2009)

Fixes issue 6847, assigned several tables from core package to more meaningfull package, removed core package, removed T_Report table, changed names of several tables

---
U trunk/referencedata/sampledata/Accounting_Test.xml
U trunk/referencedata/sampledata/BigBazaar.xml
U trunk/src-db/database/sourcedata/AD_FIELD.xml
U trunk/src-db/database/sourcedata/AD_PACKAGE.xml
U trunk/src-db/database/sourcedata/AD_TABLE.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=11937&sc=1 [^]