Hi,
This mail is relevant when adding new tables to Openbravo.

Today I committed a change to trunk which makes it mandatory to set the 
classname on a new record in AD_Table and a check on uniqueness of the 
combination of classname and package.

Related to this change, when adding a new table the following is relevant:

- the AD_Table.name field is used as the tag name in xml when exporting 
and importing data for records in the table. The same xml/tag name is 
used when constructing Webservice messages. So it makes sense to choose 
a readable and understandable name here.

- when defining a table as part of a module development then the 
AD_Table.name needs to be prefixed with one of the DBPrefixes defined 
for that module, the prefix is the DBPrefix plus the underscore 
character, for example: PREFIX_MyTable.

- The same prefixing rule applies to the AD_Table.tablename (the 
physical table name in the database).

- a AD_Table record has a mandatory relation to a package (the 
AD_Package). Choose a sensible package fitting to the functional area to 
which the table applies (so not the Core package). If no such package 
exist then create a new one. The relation to the module is maintained 
through the AD_Package, so an AD_Table has an AD_Package which belongs 
to a module. When developing for a module then first a package needs to 
be defined in AD_Package, linked to the module. Then the records in 
AD_Table (for that module) can be linked to that package.

- the AD_Table.classname is used when generating a representation of the 
table in java (the entity or business object, see the src-gen 
directory). The classname is the simplename of the class (so without the 
package name). Often the AD_Table.name can be used here. The combination 
of classname and package needs to be unique.

The above info will also be added to the developers guide.

-- 

With Regards, Martin Taal

Openbravo
M: +31 6 288 48 943
@: [email protected]
Skype: martintaal

Openbravo Headquarters:
P: +34 93 27 25 947
F: +34 93 27 25 905
Address: Edificio Slan, Planta 2a, Landaben, Calle J, 31012 Pamplona, Navarra, 
Spain
Mailing address: PO Box 5117, 31010 Pamplona, Navarra, Spain


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Openbravo-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-development

Reply via email to