Description
In this documentation you will learn how to combine several tables into one DSO. For example, you want to display the contents of two tables in a grid or form. To do this, create a new entity with a source query that combines these tables. From the table you can generate the DSO and all other objects.
How to use it
You can create objects with data from more than one table. In the default objects, objects are always created for one table only.
Prerequisite: You have already created the objects for the tables you want to join.
For example: You want to join the Customers table and the Orders table. You must first create the objects for this table by choosing Quick Builder: Automatic object generation based on your DB
- Create custom entity with all desired fields.
- Copy an existing, working entity and name the newly created entity properly (e.g. with all included tables).
- In the entity instances:
- Drag&Drop your needed data fields from the other tables to the entity, adjust the sequence if needed.
- In the entity do the following:
- Attribute
SourceTables
: Insert all the required tables comma-separated with the naming databasename.tablename,databasename.tablename. - Attribute
SourceQuery
: Adjust the Query to the needed one. - Attribute
EntityName
: Adjust the name (last part) to the name of your new created entity. - Create DSO out of the entity.
- Go to the screen Entities + fields and open Generate datasources.
- Enter a name and module
- Select in the drop down the field “Entity”
- Select your newly created “Entity” from step 1
- enter a temp table name. E.g. eCustomerOrder
- Configure DSO and Create needed objects out of the DSO
- Now you can test you new instance by opening the URL
[YOUR CURRENT GITPOD URL]/web/Resource/[RESOURCENAME OF THE DSO]
. - Take the resourceName out of the attribute
resourceName
of the DSO. - To Create the desired objects for this entity, e.g. a grid, go to menu Grids and use the function
Generate Grids
. - Choose a Name, Title and Description (in field Name can also be added a new one).
- Choose your created Entity.
- Choose your fields (you can also type in an asterisk
*
to have all the fields). - Choose your module.
Back to Documentation
Back to Home Page