Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011520Openbravo ERP00. Application dictionarypublic2009-11-26 16:492010-02-02 10:27
networkb 
alostale 
immediateminoralways
closedfixed 
5
2.50MP8 
2.50MP112.50MP11 
Core
No
0011520: It's possible create a column with reserved names of java
It's possible create a column with reserved names of java. Application should not allow to include names with reserved values.
-In your DB add a column, called 'Class', in a table.
-As System Adiministrator go to Application Dictionary || Tables and Columns || Table.
-Select the table which you had created the column, and click 'Create Columns From DB'

-Compile the table: ant compile.development -Dtab='Table's name'
No tags attached.
related to defect 0010429 closed guilleaer Data Package allows invalid Java package names 
Issue History
2009-11-26 16:49networkbNew Issue
2009-11-26 16:49networkbAssigned To => rafaroda
2009-12-07 10:33psarobeStatusnew => scheduled
2009-12-07 10:33psarobeAssigned Torafaroda => alostale
2009-12-07 10:33psarobefix_in_branch => pi
2009-12-09 08:51rafarodaPriorityimmediate => urgent
2009-12-09 08:51rafarodafix_in_branchpi =>
2009-12-16 09:31alostaleRelationship addedrelated to 0010429
2009-12-16 10:01alostaleNote Added: 0022851
2009-12-16 10:02alostaleNote Deleted: 0022851
2009-12-16 10:32hgbotCheckin
2009-12-16 10:32hgbotNote Added: 0022853
2009-12-16 10:32hgbotStatusscheduled => resolved
2009-12-16 10:32hgbotResolutionopen => fixed
2009-12-16 10:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/38e79d643233e4f6054b4dafb0c0519f2dae513b [^]
2009-12-16 13:08hgbotCheckin
2009-12-16 13:08hgbotNote Added: 0022860
2009-12-16 13:08hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/38e79d643233e4f6054b4dafb0c0519f2dae513b [^] => http://code.openbravo.com/erp/devel/pi/rev/0f16f9e570fa78bba6a5911c50aadeb70cc4a48e [^]
2009-12-19 00:36hudsonbotCheckin
2009-12-19 00:36hudsonbotNote Added: 0022945
2009-12-19 00:36hudsonbotCheckin
2009-12-19 00:36hudsonbotNote Added: 0022948
2009-12-21 09:35sureshbabuNote Added: 0022972
2009-12-21 09:35sureshbabuStatusresolved => closed
2009-12-21 09:35sureshbabuFixed in Version => 2.50MP10
2009-12-22 00:00anonymoussf_bug_id0 => 2918981
2010-01-28 10:06iperdomoNote Added: 0023843
2010-01-28 10:06iperdomoStatusclosed => new
2010-01-28 10:06iperdomoResolutionfixed => open
2010-01-28 10:06iperdomoFixed in Version2.50MP10 =>
2010-01-28 10:06iperdomoStatusnew => scheduled
2010-01-28 10:06iperdomofix_in_branch => pi
2010-01-28 10:06iperdomoPriorityurgent => immediate
2010-01-28 10:06iperdomofix_in_branchpi =>
2010-01-28 10:35alostaleNote Added: 0023846
2010-01-28 11:23eduardo_ArgalNote Added: 0023847
2010-01-28 12:26alostaleStatusscheduled => resolved
2010-01-28 12:26alostaleFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/0f16f9e570fa78bba6a5911c50aadeb70cc4a48e [^] => https://code.openbravo.com/erp/devel/pi/rev/94d1960e6863 [^]
2010-01-28 12:26alostaleResolutionopen => fixed
2010-02-02 10:27sureshbabuNote Added: 0023906
2010-02-02 10:27sureshbabuStatusresolved => closed
2010-02-02 10:27sureshbabuFixed in Version => 2.50MP11

Notes
(0022853)
hgbot   
2009-12-16 10:32   
Repository: erp/devel/pi
Changeset: 38e79d643233e4f6054b4dafb0c0519f2dae513b
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Dec 16 10:31:48 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/38e79d643233e4f6054b4dafb0c0519f2dae513b [^]

fixed bug 11520: It's possible create a column with reserved names of java

---
M src-db/database/model/triggers/AD_COLUMN_TRG2.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0022860)
hgbot   
2009-12-16 13:08   
Repository: erp/devel/pi
Changeset: 0f16f9e570fa78bba6a5911c50aadeb70cc4a48e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Dec 16 13:07:45 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/0f16f9e570fa78bba6a5911c50aadeb70cc4a48e [^]

fixed bug 11520: added missing function

---
A src-db/database/model/functions/AD_ISJAVAWORD.xml
---
(0022945)
hudsonbot   
2009-12-19 00:36   
---
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/38e79d643233 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/867059305a34 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15773.obx [^]
---
(0022948)
hudsonbot   
2009-12-19 00:36   
---
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/0f16f9e570fa [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/867059305a34 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15773.obx [^]
---
(0022972)
sureshbabu   
2009-12-21 09:35   
System not allowing the user to create a column with java reserved names.

Right now system throws the below error message, when we click the 'Create columns from DB' button in Application Dictionary || Tables and Columns || Table after adding a column name 'Class' in a table.
      
"Error:
Not allowed column name "Class" is a reserved java keyword."
(0023843)
iperdomo   
2010-01-28 10:06   
This fix prevents users to modify existing tables that have a isDefault column already in core, e.g. C_CashBook
http://wiki.openbravo.com/wiki/ERP/2.50/Developers_Guide/Database_Model/org.openbravo.model.financialmgmt.cashmgmt/C_CashBook [^]
(0023846)
alostale   
2010-01-28 10:35   
The problem is the current fix is an overreaction to the initial issue. DAL doesn't generate physical members in the classes for the columns, but it does just add properties with getters and setters. So there's no problem with having columns named like Java reserved words, unless the generated getter and/or setter creates a conflict. This is the case of "class" name with creates a getClass method.

The final fix will prevent just columns named "class", but it will allow other Java reserved words.
(0023847)
eduardo_Argal   
2010-01-28 11:23   
Fix done in 0f16f9e570fa, is preventing the creation of new column for tables that already contains column that do not follow Java reserved words validation.
An example is any table containing column named IsDefault as its name results in Default which is a reserved name in java.
(0023906)
sureshbabu   
2010-02-02 10:27   
Tested working fine