Difference between revisions of "HowTo:Create a new Relation"
(Created page with "A Relation is for a n:m compound. On a relation, further data can be stored on the RELATIONDATA. # Navigate to the MetaClass ''RELATION'' via the ''[[Class Browser...") |
|||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | A [[Relation]] is for a n:m | + | A [[Relation]] is for a n:m relationship between various objects. On such a relational object additional data can be stored on its [[RELATIONDATA]]. |
− | # Navigate to the [[MetaClass]] | + | # Navigate to the [[MetaClass]] [[RELATION]] in the ''[[Class Browser]]''<br/>[[File:UI_relation_01.PNG|220 px|border|alt=Relation|Relation]] |
# Create a new instance using the ''[[Bulk Editor]]''<br/>[[File:UI_relation_02.PNG|880px|border|alt=Relation|Relation]] | # Create a new instance using the ''[[Bulk Editor]]''<br/>[[File:UI_relation_02.PNG|880px|border|alt=Relation|Relation]] | ||
− | # | + | # It is required to set at least |
− | # Save the changes | + | #* '''TARGETTYPELEFT''': reference to the MetaClass of the right object of the relation |
+ | #* '''TARGETTYPERIGHT''': reference to the MetaClass of the left object of the relation | ||
+ | #* '''RELATIONDATA''': reference to the MetaClass used as template for the relational data<p>either by</p> | ||
+ | #* dragging and dropping a MetaClass object onto the cell | ||
+ | #* selecting the desired MetaClass from the dialog appearing after double-clicking the cell | ||
+ | # It is recommended to set at least name and description | ||
+ | # Save the changes with {{key press|Ctrl|S}} or the save command | ||
# As the relation data also a derivation of MetaClass RELATIONDATA can be used. For example to store more data on the relationship. | # As the relation data also a derivation of MetaClass RELATIONDATA can be used. For example to store more data on the relationship. | ||
+ | |||
+ | {{Attention|Relations have to be unqiue, so you can not create two relations with the same name!}} | ||
+ | |||
+ | {{Hint|The system creates an additional (but only internally used) MetaClass containing the relational data. This MetaClass will be created in the same namespace as its template. If the Namespace of the template ends with '''Template''', this part is replaced with '''Data'''.<br /><br />For example, the MetaClass for the relational data based on a template in '''Custom.Relation.Template''' is created in the namespace '''Custom.Relation.Data'''}} | ||
+ | [[Category:Studio]] | ||
[[Category:How-To]] | [[Category:How-To]] | ||
− |
Latest revision as of 15:51, 2 February 2015
A Relation is for a n:m relationship between various objects. On such a relational object additional data can be stored on its RELATIONDATA.
- Navigate to the MetaClass RELATION in the Class Browser
- Create a new instance using the Bulk Editor
- It is required to set at least
- TARGETTYPELEFT: reference to the MetaClass of the right object of the relation
- TARGETTYPERIGHT: reference to the MetaClass of the left object of the relation
- RELATIONDATA: reference to the MetaClass used as template for the relational data
either by
- dragging and dropping a MetaClass object onto the cell
- selecting the desired MetaClass from the dialog appearing after double-clicking the cell
- It is recommended to set at least name and description
- Save the changes with Ctrl+S or the save command
- As the relation data also a derivation of MetaClass RELATIONDATA can be used. For example to store more data on the relationship.