In certain cases the simple dot operator based navigation is ambiguous,
because the source end to be used has to be chosen, too.
This problem regards higher order reflexive associations and reflexive
association classes.
In the current USE version, the standard OCL qualification mechanism can be
used to select a source association end.
The following class and object diagrams demonstrate the problem:
The following navigation is ambiguous:
use> ? Ada.employeeRanking.score
< input >:1:5: The navigation path is ambiguous. A qualification of the source
association end is required.
|
By qualifying the navigation by selecting 'bosses' as the source association
end (in square brackets), the expression evaluates as follows:
use> ? Ada.employeeRanking[bosses].score
-> Bag{90} : Bag(Integer)
|
(back)
|