Let's say I have
BaseB can have to several references of
BaseA instances. Now, we have two other classes,
DerivedB that respectively inherit from
How can I show in such a diagram that
DerivedB should only store instances of
DerivedA and not instances of
BaseA? It seemed pretty simple before I tried to draw it, but now I'm confused. One obvious answer would be "redesign your code"; if there is no alternative, I will probably try to do so.