-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Links + Init arbre docs / platform
- Loading branch information
1 parent
735203d
commit 38194eb
Showing
38 changed files
with
264 additions
and
92 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
content/CTG_30_tutorial/CTG_10_getting-started/LSN_02_object/object_ENU.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+2.43 KB
content/CTG_30_tutorial/CTG_20_expanding/LSN_02_relations/edit-form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.4 KB
content/CTG_30_tutorial/CTG_20_expanding/LSN_02_relations/field-area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
content/CTG_30_tutorial/CTG_20_expanding/LSN_02_relations/lesson.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"tags": ["lvl1"], | ||
"display": "LINEAR", | ||
"FRA": { | ||
"title": "Créer relations", | ||
"description": "" | ||
|
90 changes: 36 additions & 54 deletions
90
content/CTG_30_tutorial/CTG_20_expanding/LSN_02_relations/relations_ENU.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,49 @@ | ||
Creating links | ||
==================== | ||
# Building the "Order Management" Training App : Creating links | ||
|
||
Concepts | ||
--------------------------- | ||
> Prerequisite : [The Supplier, Product, Client and Order objects must be complete before starting this tutorial](/lesson/tutorial/getting-started/object) | ||
The definition of a 1:N relationship allows two business objects to be linked together. If we take the example of the supplier and the product, there is 1 supplier for N products. This section presents what the Simplicité engine does with the configuration of objects, attributes and relationships. | ||
## What is a Link ? | ||
|
||
### Technical key of the business object | ||
A Link in Simplicité represents a relationship between Business objects. It is defined physically by a foreign key in the database and configured using an Object field... [Learn more](/lesson/docs/platform/business-objects/links) | ||
|
||
From the definition of the physical object and attribute names, a table and a column are created in the database. In reality, as soon as a business object is created, 5 default columns are created, the **technical fields**. This can be verified by testing an SQL query via the "DB Access" shortcut as seen in the previous chapter: | ||
## Creating a Link between Supplier and Product | ||
|
||
``` | ||
select * from trn_supplier; | ||
``` | ||
To create a link between the **Supplier** Business object and the **Product** Business object, follow the steps below : | ||
1. In the **Business objects > Business objects** menu | ||
2. Open **TrnProduct** | ||
3. Click **Edit form** on the Business object's form (this will open the **template editor**) | ||
<img src="edit-form.png" alt="edit-form" width="25%"/> | ||
4. Hover over the **Field Area** and click on the `+` | ||
<img src="field-area.png" alt="field-area" width="75%"/> | ||
> For more information about Field Areas, see [Field Area](lesson/docs/core/objects/field-area) | ||
5. Click **Business Object** | ||
6. In the search box, enter **TrnSupplier** | ||
<img src="search-supplier.png" alt="search" width="75%"/> | ||
7. Check **Functional key ?** and **Required ?** | ||
> For more information about Functional keys, see [Functional key](lesson/docs/core/platform/business-objects/fields#functional-key) | ||
8. Click **Save** | ||
|
||
We obtain the following columns: | ||
The **Supplier Code** Joined field is added to the template. | ||
> For more information about Joined field, see [Joined field](lesson/docs/core/platform/business-objects/fields#joined-field) | ||
|
||
| row\_id | created\_dt | created\_by | updated\_dt | updated\_by | trn\_sup\_code | | ||
|---------|-------------|-------------|-------------|-------------|----------------| | ||
| | | | | | | | ||
## Creating a Link between Product and Order | ||
|
||
The `row_id` column is what we call the **technical key**. It is generated and managed by the base, **so there is no need to create ID attributes** for your objects. | ||
To create a link between the **Product** Business object and the **Order** Business object, follow the steps below : | ||
1. In the **Business objects > Business objects** menu | ||
2. Open **TrnOrder** | ||
3. Click **Edit form** on the Business object's form (this will open the **template editor**) | ||
4. Hover over the **Field Area** and click on the `+` | ||
5. Click **Business Object** | ||
6. In the search box, enter **TrnProduct** | ||
7. Check **Functional key ?** and **Required ?** | ||
8. Click **Save** | ||
|
||
These 5 columns are not intended to be visible to the user. | ||
This will add the **TrnProduct** joined fields to the template, allowing the Order object to reference a product. | ||
|
||
### Functional key of the business object | ||
## Creating a link between Client and Order | ||
|
||
The functional key is a set of fields defining the **functional** uniqueness of the business object. Thus, if we decide that the functional key of the customer is composed of his name and his first name, then we cannot have two customers with the same name + first name. | ||
To create a link between the **Client** and **Order** business objects, follow the same steps as for linking **Product** to **Order**, with one key difference: | ||
|
||
**Every business object must have a functional key**. *If there is no key, Simplicité will only allow the creation of one record, which will have an "empty" functional key. The second record, also having an "empty" functional key, will trigger an error because the functional key already exists.* | ||
6. In the search box, enter TrnClient instead of TrnProduct. | ||
|
||
### Foreign key | ||
|
||
A link between two objects is defined: | ||
- physically, by **a column in the referencing object's table**, pointing to the `row_id` column of the referenced object | ||
- in terms of configuration, by: | ||
- an attribute of type Internal ID/Technical Key (created automatically when the relationship is created), | ||
- an object field with the following information : | ||
- the object referenced in "Joined object" | ||
- empty "referenced field" | ||
|
||
|
||
### Joined fields | ||
|
||
When there is a 1:N relationship between two objects, it becomes possible to add joined fields to the referring object. In our example, it is possible to display supplier information on the product form. | ||
|
||
There are three ways to join fields: | ||
- when creating the relationship between two objects | ||
- by using template editor | ||
- by manually creating a correctly configured object field | ||
|
||
The joined field is defined: | ||
- physically, by the joined object | ||
- in terms of configuration by an object field linking **the joined object's field** to **the referencing object**, and containing: | ||
- the referenced object in "linked object" | ||
- the foreign key used in "reference field" | ||
|
||
|
||
Exercise | ||
--------------------------- | ||
|
||
- Create the following links, systematically joining the functional key of the referenced object: | ||
- Supplier <-1:N- Product | ||
- Product <-1:N- Order | ||
- Customer <-1:N- Order | ||
- Edit the order form and use the dedicated option to join a new field of a referenced object ("+" button on the template editor > Name of referenced object > ) | ||
This will add the **TrnClient** joined fields to the template, allowing the Order object to reference client information. |
Binary file added
BIN
+8.29 KB
content/CTG_30_tutorial/CTG_20_expanding/LSN_02_relations/search-supplier.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
content/CTG_50_docs/CTG_05_platform/CTG_10_project/category.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"FRA": { | ||
"title": "Projet", | ||
"description": "" | ||
}, | ||
"ENU": { | ||
"title": "Project", | ||
"description": "" | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
content/CTG_50_docs/CTG_05_platform/CTG_20_settings/category.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"FRA": { | ||
"title": "Configuration", | ||
"description": "" | ||
}, | ||
"ENU": { | ||
"title": "Settings", | ||
"description": "" | ||
} | ||
} |
File renamed without changes
5 changes: 2 additions & 3 deletions
5
...TG_9_objects/LSN_03_attribute/lesson.json → ...G_30_users-rights/LSN_10_user/lesson.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
{ | ||
"tags": ["lvl1"], | ||
"display": "LINEAR", | ||
"FRA": { | ||
"title": "Attribut", | ||
"title": "Utilisateurs", | ||
"description": "" | ||
}, | ||
"ENU": { | ||
"title": "Field", | ||
"title": "Users", | ||
"description": "" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
content/CTG_50_docs/CTG_05_platform/CTG_30_users-rights/category.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"FRA": { | ||
"title": "Habilitation", | ||
"description": "" | ||
}, | ||
"ENU": { | ||
"title": "Users and rights", | ||
"description": "" | ||
} | ||
} |
5 changes: 2 additions & 3 deletions
5
...ore/CTG_9_objects/LSN_04_user/lesson.json → ...business-objects/LSN_07_links/lesson.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
{ | ||
"tags": ["lvl1"], | ||
"display": "LINEAR", | ||
"FRA": { | ||
"title": "Utilisateur", | ||
"title": "Liens", | ||
"description": "" | ||
}, | ||
"ENU": { | ||
"title": "User", | ||
"title": "Links", | ||
"description": "" | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
...t/CTG_50_docs/CTG_05_platform/CTG_40_business-objects/LSN_07_links/links_ENU.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Links | ||
==================== | ||
|
||
### What is a Link ? | ||
|
||
If the object has a form, the attribute will be a field of this form. The configuration of the attribute allows to determine if it is mandatory or not, its type (text, number, single or multiple enumerated) etc. | ||
|
||
Just like a business object, the field has a logical and physical name. The logical name identifies the attribute in the business rules, in the code and will follow the same syntactical conventions as Java variables. The physical name will be used to create a column in the business object's table. A field might not have a physical name, it's the case for non persisted calculated fields. | ||
|
||
We will now introduce you to a fundamental aspect of the metamodel: the **object field**. One field can be used on several objects: a "comment" field, for instance, can be used on the 300 objects of the app. If the size of this field needs to be increased, to allow the input of longer comments, it can be done by changing the parameters of one single attribute, instead of changing the 300 comment fields of our 300 business objects. Furthermore, a field doesn't have to be linked to an object (storage field for a planned task, process filed, etc). In the metamodel this concept is represented by a **N/N link between the field and the business object** therefore introducing a link object. In Simplicité, the link object between a business object and a field is called **object field**. The object field object allows to **override** the parameters of the attribute (mandatory, translation, etc). | ||
|
||
When a field is linked to an object via an object field, Simplicité will create a column in the business object's table. | ||
|
||
### Technical key of the business object | ||
|
||
From the definition of the physical object and attribute names, a table and a column are created in the database. In reality, as soon as a business object is created, 5 default columns are created, the **technical fields**. This can be verified by testing an SQL query via the "DB Access" shortcut as seen in the previous chapter: | ||
|
||
| row\_id | created\_dt | created\_by | updated\_dt | updated\_by | | ||
|---------|-------------|-------------|-------------|-------------| | ||
| | | | | | | ||
|
||
The `row_id` column is what we call the **technical key**. It is generated and managed by the base, **so there is no need to create ID attributes** for your objects. | ||
|
||
These 5 columns are not intended to be visible to the user. | ||
|
||
### Functional key of the business object | ||
|
||
The functional key is a set of fields defining the **functional** uniqueness of the business object. Thus, if we decide that the functional key of the customer is composed of his name and his first name, then we cannot have two customers with the same name + first name. | ||
|
||
**Every business object must have a functional key**. *If there is no key, Simplicité will only allow the creation of one record, which will have an "empty" functional key. The second record, also having an "empty" functional key, will trigger an error because the functional key already exists.* | ||
|
||
### Foreign key | ||
|
||
A link between two objects is defined: | ||
- physically, by **a column in the referencing object's table**, pointing to the `row_id` column of the referenced object | ||
- in terms of configuration, by: | ||
- an attribute of type Internal ID/Technical Key (created automatically when the relationship is created), | ||
- an object field with the following information : | ||
- the object referenced in "Joined object" | ||
- empty "referenced field" | ||
|
||
|
||
### Joined fields | ||
|
||
When there is a 1:N relationship between two objects, it becomes possible to add joined fields to the referring object. In our example, it is possible to display supplier information on the product form. | ||
|
||
There are three ways to join fields: | ||
- when creating the relationship between two objects | ||
- by using template editor | ||
- by manually creating a correctly configured object field | ||
|
||
The joined field is defined: | ||
- physically, by the joined object | ||
- in terms of configuration by an object field linking **the joined object's field** to **the referencing object**, and containing: | ||
- the referenced object in "linked object" | ||
- the foreign key used in "reference field" |
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions
6
...jects/LSN_10_business-objects/lesson.json → ...jects/LSN_20_business-objects/lesson.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
{ | ||
"display": "LINEAR", | ||
"published": true, | ||
"ANY": { | ||
"ENU": { | ||
"title": "Business objects" | ||
}, | ||
"FRA": { | ||
"title": "Objets métier" | ||
} | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
56 changes: 56 additions & 0 deletions
56
...CTG_50_docs/CTG_05_platform/CTG_40_business-objects/LSN_50_fields/fields_ENU.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Fields | ||
==================== | ||
|
||
### What is a Field ? | ||
|
||
If the object has a form, the attribute will be a field of this form. The configuration of the attribute allows to determine if it is mandatory or not, its type (text, number, single or multiple enumerated) etc. | ||
|
||
Just like a business object, the field has a logical and physical name. The logical name identifies the attribute in the business rules, in the code and will follow the same syntactical conventions as Java variables. The physical name will be used to create a column in the business object's table. A field might not have a physical name, it's the case for non persisted calculated fields. | ||
|
||
We will now introduce you to a fundamental aspect of the metamodel: the **object field**. One field can be used on several objects: a "comment" field, for instance, can be used on the 300 objects of the app. If the size of this field needs to be increased, to allow the input of longer comments, it can be done by changing the parameters of one single attribute, instead of changing the 300 comment fields of our 300 business objects. Furthermore, a field doesn't have to be linked to an object (storage field for a planned task, process filed, etc). In the metamodel this concept is represented by a **N/N link between the field and the business object** therefore introducing a link object. In Simplicité, the link object between a business object and a field is called **object field**. The object field object allows to **override** the parameters of the attribute (mandatory, translation, etc). | ||
|
||
When a field is linked to an object via an object field, Simplicité will create a column in the business object's table. | ||
|
||
### Technical key of the business object | ||
|
||
From the definition of the physical object and attribute names, a table and a column are created in the database. In reality, as soon as a business object is created, 5 default columns are created, the **technical fields**. This can be verified by testing an SQL query via the "DB Access" shortcut as seen in the previous chapter: | ||
|
||
| row\_id | created\_dt | created\_by | updated\_dt | updated\_by | | ||
|---------|-------------|-------------|-------------|-------------| | ||
| | | | | | | ||
|
||
The `row_id` column is what we call the **technical key**. It is generated and managed by the base, **so there is no need to create ID attributes** for your objects. | ||
|
||
These 5 columns are not intended to be visible to the user. | ||
|
||
### Functional key | ||
|
||
The functional key is a set of fields defining the **functional** uniqueness of the business object. Thus, if we decide that the functional key of the customer is composed of his name and his first name, then we cannot have two customers with the same name + first name. | ||
|
||
**Every business object must have a functional key**. *If there is no key, Simplicité will only allow the creation of one record, which will have an "empty" functional key. The second record, also having an "empty" functional key, will trigger an error because the functional key already exists.* | ||
|
||
### Foreign key | ||
|
||
A link between two objects is defined: | ||
- physically, by **a column in the referencing object's table**, pointing to the `row_id` column of the referenced object | ||
- in terms of configuration, by: | ||
- an attribute of type Internal ID/Technical Key (created automatically when the relationship is created), | ||
- an object field with the following information : | ||
- the object referenced in "Joined object" | ||
- empty "referenced field" | ||
|
||
|
||
### Joined fields | ||
|
||
When there is a 1:N relationship between two objects, it becomes possible to add joined fields to the referring object. In our example, it is possible to display supplier information on the product form. | ||
|
||
There are three ways to join fields: | ||
- when creating the relationship between two objects | ||
- by using template editor | ||
- by manually creating a correctly configured object field | ||
|
||
The joined field is defined: | ||
- physically, by the joined object | ||
- in terms of configuration by an object field linking **the joined object's field** to **the referencing object**, and containing: | ||
- the referenced object in "linked object" | ||
- the foreign key used in "reference field" |
Oops, something went wrong.