In this example, we will show the functionality of “Same type for recursive links” option. Assume we have 2 link types - Linktype1 and Linktype2. And we have the following 5 classes that are linked in the following way:
As you may notice, only A1 and A7 are connected with LinkType2. In a repository view it will look like:
If we option “Same type for recursive links” enabled, then the initial link type will be chosen and will be used as a restriction for further links down that path.That means, in the diagram above if we start with the object A1, then we would expect the following objects to show up:
- A2, A6 - since they are linked using the same link type as A2 and A1 (namely LinkType1)
- A7 - since it is a direct child of A1 (connected via LinkType2)
- A3 - since it is a direct child of A1. Notice that A4 will not be shown, since it has a different link type. Although A5 and A4 have the same link type as A1 and A3 (LinkType1) it will also not be show, because the trace path was already terminated between A3 and A4.
This will also be shown in the QueryBuilder results: