4,395
edits
No edit summary |
|||
| Line 9: | Line 9: | ||
{{flag en}} This table allows to save the links between entities. | {{flag en}} This table allows to save the links between entities. | ||
For example when a contract must be linked to a intervention card, we use this table. | For example when a contract must be linked to a intervention card, we use this table. | ||
{{flag fr}} Cette table permet de sauvegarder les liens entre entités. | |||
Par exemple quand un contrat doit être lié à une fiche intervention, on utilisera cette table. | |||
{{flag sp}} Esta tabla le permite guardar los enlaces entre las entidades. | |||
Por ejemplo, cuando un contrato debe estar vinculado a ficha de intervención, utilizaremos esta tabla. | |||
= Structure = | |||
== Table == | |||
'''Version 1.1 2009/10/07''' | |||
{| align="left" width="100%" border="0" rules="all" cellpadding="1" cellspacing="0" style="margin: 0 0 1px 1px; border: 1px solid #dddddd; border-right-width: 2px; border-bottom-width: 2px; background-color: #f3f3f5" | |||
|style="background-color: #e9e9ef"| <b>Field</b> | |||
|style="background-color: #e9e9ef"| <b>Type</b> | |||
|style="background-color: #e9e9ef"| <b>Null</b> | |||
|style="background-color: #e9e9ef"| <b>Key</b> | |||
|style="background-color: #e9e9ef"| <b>Default</b> | |||
|style="background-color: #e9e9ef"| <b>Extra</b> | |||
|style="background-color: #e9e9ef"| <b>Description</b> | |||
|- | |||
| rowid | |||
| int(11) | |||
| NO | |||
| PRI | |||
| | |||
| auto_increment | |||
| technical index | |||
|- | |||
| sourceid | |||
| int(11) | |||
| NO | |||
| | |||
| | |||
| | |||
| ID of source (any table_of_elements->rowid) | |||
|- | |||
| sourcetype | |||
| varchar(16) | |||
| NO | |||
| | |||
| | |||
| | |||
| type of source. view content section | |||
|- | |||
| targetid | |||
| int(11) | |||
| NO | |||
| | |||
| | |||
| | |||
| ID of target (any table_of_elements->rowid) | |||
|- | |||
| targettype | |||
| varchar(16) | |||
| NO | |||
| | |||
| | |||
| | |||
| type of target. view content section | |||
|} | |||
== Keys == | |||
'''Version 1.1 2009/10/07''' | |||
{| align="left" width="100%" border="0" rules="all" cellpadding="1" cellspacing="0" style="margin: 0 0 1px 1px; border: 1px solid #dddddd; border-right-width: 2px; border-bottom-width: 2px; background-color: #f3f3f5" | |||
|style="background-color: #e9e9ef"| <b>Key</b> | |||
|style="background-color: #e9e9ef"| <b>Type</b> | |||
|style="background-color: #e9e9ef"| <b>Fields</b> | |||
|- | |||
| PRIMARY | |||
| PRIMARY | |||
| rowid | |||
|- | |||
| idx_element_element_idx1 | |||
| UNIQUE | |||
| sourceid,sourcetype,targetid,targettype | |||
|- | |||
| idx_element_element_targetid | |||
| MULTIPLE | |||
| targetid | |||
|} | |||
= Notes = | |||
{{flag en}} Historically, the links were stored in a table dedicated to each couple. In version 2.5 and above, the links should be stored in this table. | |||
This table contains 4 columns to create the links. | This table contains 4 columns to create the links. | ||
* The id of the source object | * The id of the source object | ||
| Line 33: | Line 113: | ||
{{flag fr}} | {{flag fr}} Historiquement, les liens étaient stockés dans une table dédiée à chaque couple. En version 2.5 et plus, les liens doivent être stockés dans cette table. | ||
Historiquement, les liens étaient stockés dans une table dédiée à chaque couple. En version 2.5 et plus, les liens doivent être stockés dans cette table. | |||
Cette table contient 4 colonnes pour créer les liens. | Cette table contient 4 colonnes pour créer les liens. | ||
* L'id de l'objet source | * L'id de l'objet source | ||
| Line 58: | Line 135: | ||
Ce type permet d'utiliser 1 seule et même table pour tout type de liaison au lieu de 2<sup>n</sup> tables (n étant le nombre d'entités gérées dans dolibarr). | Ce type permet d'utiliser 1 seule et même table pour tout type de liaison au lieu de 2<sup>n</sup> tables (n étant le nombre d'entités gérées dans dolibarr). | ||
{{flag sp}} Históricamente, los vínculos se almacenaban en una tabla dedicada a cada pareja. En la versión 2.5 y superiores, los enlaces se deben almacenar en esta tabla. | |||
{{flag sp}} | |||
Esta tabla contiene 4 columnas para crear los enlaces. | Esta tabla contiene 4 columnas para crear los enlaces. | ||
* El id del objeto origen | * El id del objeto origen | ||
| Line 82: | Line 156: | ||
Este tipo permite utilizar 1 sola y única tabla para todo tipo de enlace en lugar de 2<sup>n</sup> tablas (n son el número de entidades gestionadas en Dolibarr). | Este tipo permite utilizar 1 sola y única tabla para todo tipo de enlace en lugar de 2<sup>n</sup> tablas (n son el número de entidades gestionadas en Dolibarr). | ||