Openbravo Issue Tracking System - Modules
View Issue Details
0011591ModulesHQL Query Toolpublic2009-12-02 09:372014-04-01 21:46
mtaal 
mtaal 
normalminorhave not tried
closedfixed 
5
2.50 
2.502.50 
0011591: Check/correct module for new modularity naming rules
See email from Asier Lostale from 2nd of December.
New naming rules:
    * Mapping for WAD code
          o Rule: Mapping for WAD windows contains now the module's mapping for tabs not in core. As this is automatically generated and shouldn't be manually edited class and mapping tabs in Windows and Tabs window has been set as non editable.
          o Consequence: When updating to the new core version mappings in modules will be automatically updated to the new rule.
          o Action: Export the module with the new automatically generated mapping.
    * Mapping for manual code.
          o Rule: HTML mapping for all manual objects (forms, searchs, reports and processes) must start now with the module's package. For example, the mapping for a report in a module with package (org.myCompany.moduleTest) could be /org.myCompany.moduleTesr.reports/MyReport.html.
          o Consequence: Old modules not following this rule will still work, but a warning will be displayed whenever the code is compiled. These modules will not be allowed to be packaged in obx files till they are not fixed.
          o Action: The action to be taken to fix modules is to detect the incorrect mappings (it will be shown as a warning when compiling) and adapt them to the new rule.
    * Column.name value
          o Rule: Name attribute in column must follow now the same rules as Database name (columnname) had. This is, when the column is in the same module as its table, no special rule required; if it is in another module, it must start by EM_ + the module's db_prefix.
          o Consequence: This rule has been enforced in through database triggers, making not possible to create or modify existent objects if the mapping is not correct. Anyway, old modules not following this rule will still work, but a warning will be displayed whenever the code is compiled. These modules will not be allowed to be packaged in obx files till they are not fixed.
          o Action: Locate columns not following the naming and change it. Note that this will cause a change in the module's API, because this value is used by DAL to generate the property in Java. Therefore it will be necessary also to change the Java processes accessing the column with DAL.
    * Database indexes and constraints
          o Rule: Indexes and constraints now must start with the module's db_prefix if they are in the same module as their table. If they are in a different one, the rule is the same as it was (start by EM_ + db_prefix).
          o Consequence. Now when exporting database (if validate.model property is set to true) a warning will be raised if there are indexes or constraints not following the rule. It will not be allowed to package modules in obx files if they do not follow the rule.
          o Action: Rename indexes and constraints to adapt them to the new rule. Note that it is possible to define messages for constraints, in this way it is possible to display a customized message when the constraint is not satisfied. These message have as Search key value the constraint name, therefore it will be necessary to change them if exist.
    * Reference name
          o Rule: In this case a restriction has been removed. Prior to this change, reference name was unique in the whole database, thus it was possible two different module adding two reference with same name and it was not possible to install both in the same instance. Now, reference name is unique per module, so there is no problem with several modules defining the same name for different references.
          o Consequence: Now name cannot be used to identify references. Therefore constructor for TableComboData shouldn't be used passing as parameter the reference name, but its ID. This constructor has been changed and when passing name the reference is always looked within core but not in other modules.
          o Action: Review module's manual code to ensure all TableComboData constructors are called using ID when the reference is not in core.

As addition, all default messages used to be displayed when a constraint is not satisfied have been removed from database as they are automatically managed. This means that hundreds of messages have disappear and it is recommended for those of you maintaining a translation to repackage it again without all of these messages.
No tags attached.
Issue History
2009-12-02 09:37mtaalNew Issue
2009-12-02 09:37mtaalAssigned To => mtaal
2009-12-07 17:17hgbotCheckin
2009-12-07 17:17hgbotNote Added: 0022484
2009-12-07 17:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.utility.hqlquerytool/rev/089d0c6c44b27e4139f6b10fc25ad888e5a07c7e [^]
2009-12-07 17:17mtaalStatusnew => acknowledged
2009-12-07 17:18mtaalStatusacknowledged => scheduled
2009-12-07 17:18mtaalfix_in_branch => pi
2009-12-07 17:18mtaalNote Added: 0022485
2009-12-07 17:18mtaalStatusscheduled => resolved
2009-12-07 17:18mtaalFixed in Version => 2.50
2009-12-07 17:18mtaalResolutionopen => fixed
2014-04-01 21:46plujanNote Added: 0065734
2014-04-01 21:46plujanStatusresolved => closed

Notes
(0022484)
hgbot   
2009-12-07 17:17   
Repository: erp/mods/org.openbravo.utility.hqlquerytool
Changeset: 089d0c6c44b27e4139f6b10fc25ad888e5a07c7e
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Dec 07 17:16:58 2009 +0100
URL: http://code.openbravo.com/erp/mods/org.openbravo.utility.hqlquerytool/rev/089d0c6c44b27e4139f6b10fc25ad888e5a07c7e [^]

solved issue 11591: Check/correct module for new modularity naming rules

---
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
M src-db/database/sourcedata/AD_MODULE.xml
---
(0022485)
mtaal   
2009-12-07 17:18   
Fixed in changeset:
https://code.openbravo.com/erp/mods/org.openbravo.utility.hqlquerytool/rev/089d0c6c44b2 [^]
(0065734)
plujan   
2014-04-01 21:46   
Closed as marked as Resolved for too long