Jump to: navigation, search

Difference between revisions of "HowTo:Create a new Relation"


 
(8 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
#* '''TARGETTYPELEFT''': reference to the MetaClass of the right object of the relation
 
#* '''TARGETTYPELEFT''': reference to the MetaClass of the right object of the relation
 
#* '''TARGETTYPERIGHT''': reference to the MetaClass of the left 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
+
#* '''RELATIONDATA''': reference to the MetaClass used as template for the relational data<p>either by</p>
#: either by
+
 
#* dragging and dropping a MetaClass object onto the cell
 
#* dragging and dropping a MetaClass object onto the cell
 
#* selecting the desired MetaClass from the dialog appearing after double-clicking the cell  
 
#* selecting the desired MetaClass from the dialog appearing after double-clicking the cell  
Line 13: Line 12:
 
# 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!}}
+
{{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 namespace ''System.Relation.Data''}}
+
  
 +
{{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]]
[[Category:UBIK Studio]]
 

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.

  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

      either by

    • dragging and dropping a MetaClass object onto the cell
    • selecting the desired MetaClass from the dialog appearing after double-clicking the cell
  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 Attention.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 same namespace as its template. If the Namespace of the template ends with Template, this part is replaced with Data.

For example, the MetaClass for the relational data based on a template in Custom.Relation.Template is created in the namespace Custom.Relation.Data