|
Inline Associations
[Previous]  [Next] 
|
![]() |
User Manual [Previous]  [Next] Inline AssociationsAn association represents a relationship between two classes. Associations can be defined within a class, in a similar manner as you would define an attribute. Contrast this with the same model defined using independently defined associations. Example
class Group
{
// a many-to-many association
// An item has zero or more groups and a group
// has zero or more items
* -- * Item;
// An item has an optional description
// The association is directed, so descriptions
// do not know which groups link to them
1 -> 0..1 Description;
}
class Item
{}
class Description
{}
Load the above code into UmpleOnline SyntaxinlineAssociation : [=modifier:immutable]? [[inlineAssociationEnd]] [=arrow:--  |->  |<-  |><  |<@>-  |-<@>] [[associationEnd]] ; inlineAssociationEnd : [[multiplicity]] [~roleName]? [[isSorted]]? associationEnd : [[multiplicity]] [type] [~roleName]? [[isSorted]]? |