View source | Discuss this page | Page history | Printable version   

ERP 2.50:Developers Guide/Concepts/AD/Dataset

ERP 2.50:Developers Guide

Index


Contents

Introduction

The Dataset concept allows you to define sets of data from different tables and export this data in one step. Datasets are especially usefull for managing reference data for a module, for example tax rates or default data in new tables added by a module. The reference data is packaged, distributed and installed together with the program code implementing the module.

The content of a Dataset is defined by its Dataset Tables and Dataset Columns. The first defines which tables are exported, the second which columns of each table are executed.

Main Concepts

Dataset

A Dataset is a grouping of different tables (entities) which are exported together. Datasets are defined through the Dataset menu in the Application Dictionary. Below is an example of a Dataset.


Dataset.png


Some important things to note:

If the export allowed column is flagged then an export button is displayed. When clicking this button the data is exported to the modules directory of the module to which the Dataset belongs:


Export data.png

DatasetTable

The DatasetTable defines which data of one table is to be exported. It defines both the records (through a where clause) and the columns per record. A Dataset can have zero or more Dataset Tables, a Dataset Table belongs always to exactly one Dataset.


Dataset table.png


Some important aspects:

DatasetTable where clause

To select specific objects from the table to be included in the data set it is possible to define a where clause in the DatasetTable. The SQL where clause is a HQL where Clause. The properties which can be used in the clause are the properties of the table (= entity) of the DatasetTable. The entity and property names gives an overview of all properties by their entity. There are two standard parameters which can be used in the HQL clause:

The syntax of using these parameters in the where-clause is the same as for named parameters in HQL in general.

Here are some examples of where clauses:

The clause can contain inner-selects and other more advanced HQL features. However, order-by, group-by and having clauses are not supported, so the content of this field should just be the where-clause and nothing more.

DatasetColumns

The Dataset Columns defines the columns/properties which are exported for a certain business object (= Dataset Table). A Dataset Column always belongs to one Dataset Table, and a Dataset Table can have zero or more Dataset Columns. The Dataset Column concept can be used in two ways:


Dataset column.png


The main fields:


Usage of Datasets

The main purpose of Datasets is to define reference data for modules. This function is explained in more detail here. Datasets are exported:

The reference data is inserted when a module is applied (build and installed). Or can be imported separately (see next section).

Importing Reference Data on Organization level

The module reference data can be imported into an organization using the Enterprise Module Management function. It is available in the menu here: General Setup > Enterprise > Enterprise module management > Enterprise module management.


Update reference data.png


Select the organization and the module from which to import the reference data into the organization. Then press ok. After a while the result page is displayed:


Update reference data result.png




ERP 2.50:Developers Guide/Concepts/AD/Element and Synchronize Terminology | ERP 2.50:Developers Guide/Concepts/DB Fundamentals 

Retrieved from "http://wiki.openbravo.com/wiki/ERP_2.50:Developers_Guide/Concepts/AD/Dataset"

This page has been accessed 11,803 times. This page was last modified on 14 June 2011, at 11:03. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.