|
E021 Invalid Reflexive Association
[Previous]  [Next] 
|
![]() |
User Manual [Previous]  [Next] E021 Invalid Reflexive AssociationUmple syntactic error reported when a class has a reflexive association (an association with both ends the same) but there is neither a role name (indicating it is asymmetric), nor a 'self' keyword (indicating it is symmetric).Code cannot be generated for asymmetric reflexive associations unless there is a role name at at least one end. This ensures the generated API has distinct words for each end. For more information about reflexive associations, see this page. Example
// The following example shows
// how to generate this error.
class X {
0..1 -- 0..1 X;
}
Load the above code into UmpleOnline Solution to The Above So the Message No Longer Appears
// The following example shows how
// to fix the error if this is an
// asymmetric association.
class X {
0..1 -- 0..1 X right;
}
Load the above code into UmpleOnline Another Solution to The Above So the Message No Longer Appears
// The following example shows how to fix
// the error if this is a symmetric association.
class X {
0..1 self right;
}
Load the above code into UmpleOnline |