Jump to: navigation, search

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...")
 
Line 1: Line 1:
A [[Relation]] is for a n:m compound. On a relation, further data can be stored on the [[RELATIONDATA]].
+
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'' via the ''[[Class Browser]]''<br/>[[File:UI_relation_01.PNG|220 px|border|alt=Relation|Relation]]
+
# 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]]
# Set at least name, description, targettype left, targettype right and relation data template
+
# 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
 +
# 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.
 +
 +
{{Hint|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 namespace ''System.Relation.Data''}}
 +
 
[[Category:How-To]]
 
[[Category:How-To]]
 
[[Category:UBIK Studio]]
 
[[Category:UBIK Studio]]

Revision as of 17:39, 18 November 2013

A Relation is for a n:m relationship between various objects. On such a relational object additional data can be stored on its RELATIONDATA.

  1. Navigate to the MetaClass RELATION in the Class Browser
    Relation
  2. Create a new instance using the Bulk Editor
    Relation
  3. 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
  4. It is recommended to set at least name and description
  5. Save the changes with Ctrl+S or the save command
  6. As the relation data also a derivation of MetaClass RELATIONDATA can be used. For example to store more data on the relationship.
IC Hint square.pngRelations have to be unqiue, so you can not create two relations with the same name!
IC Hint square.pngThe system creates an additional (but only internally used) MetaClass containing the relational data. This MetaClass will be created in the namespace System.Relation.Data