It's all about the answers!

Ask a question

IBaselineHierarchyResult: Multiple parents for the same child?


Marko Tomljenovic (3163685) | asked May 24 '17, 11:15 a.m.

Looking at the class IBaselineHierarchyResult and the method getChildToParentsMap() it seems that there can be multiple parents for one child.

Is that really possible?
If so in which situation?

Or (my assumption) is it there because this interface is also implemented by IComponentHierarchyResult and a component can have multiple parents (since in each stream there can be a different component hierarchy)?

Please help to understand the code.

Thank you

Accepted answer


permanent link
Geoffrey Clemm (30.0k23035) | answered May 31 '17, 9:59 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 At a logical level, yes, a particular child baseline can be referenced by an arbitrary number of parent baselines.

To do so, create stream X with baseline A.3 of component A and baseline B.5 of component B.
Then create stream Y with baseline C.4 of component C and baseline B.5 of component B.
In stream X, make B a child of A, and then baseline A, resulting in a new baseline of A whose child is baseline B.5
In stream Y, make B a child of C, and then baseline b, resulting in a new baseline of C whose child is baseline B.5.

Or did i misunderstand your question?

Marko Tomljenovic selected this answer as the correct answer

Comments
Marko Tomljenovic commented Jun 01 '17, 4:16 a.m.

Yes, Geoff, you are right.
I had the impression that the baselinehierarchyresult object is created in the context of one snapshot/stream. But it is not, it is global (whole repository).
And then a baseline can have of course multiple parents (each in different streams/snapshots).
Thank you

Your answer


Register or to post your answer.