- This topic has 3 replies, 2 voices, and was last updated 17 years, 10 months ago by Riyad Kalla.
-
AuthorPosts
-
Paul CahillMemberHello Support,
There is a problem with the code generator as it assumes a that a derived class that has a collection relationship with its base class is somehow assumed to be multiple inheritance. ah no. I have a repeatable problem that requires me to correct the code that is generated.
ala
BASE CLASS
^ |
| |
| | 1..*
DERIVED CLASSThis is not multiple inheritance. I would suggest the developer did not ensure the relationships were all inheritance.
Regards,
Paul Cahill
Riyad KallaMemberPaul,
How do I setup this relationship? I created a Base and Derived class, and created a realization of stereotype Derived and generated the code and it was single inheritence. I’m sure I’m doing this wrong though, please point out where.
Paul CahillMember@support-rkalla wrote:
Paul,
How do I setup this relationship? I created a Base and Derived class, and created a realization of stereotype Derived and generated the code and it was single inheritence. I’m sure I’m doing this wrong though, please point out where.On further investigation, it seems that there was an invisible generalisation between the base class two levels down and a generalisation to a new intermediate base class therefore forming and invisible multiple inheritance canonical form. When I say invisible, I mean not visible on any diagram or visible in the navigator panel either. It seems that when the original link was made, it was subsequently deleted but not deleted from the model repository. The only way I discovered it was to assume it existed first then go to each class and select Show Edges. This raised the erroneous links and allowed me to delete them from the model completely.
This is a real problem. Perhaps when users are asked to delete a link from a diagram and there are no other links on any other diagram then they should be prompted and asked if the link should be deleted from the repository. Either this or implicitly delete links when they are no longer visible on any diagram. After discovering this link problem I subsequently found several other instances of this kind of problem in the repository.
Can you please implement my suggested fix as this is a sleeping bug that is hard to diagnose and easy to fall prey to.
Regards,
Paul Cahill
Riyad KallaMemberPaul I will certainly pass it along to the UML team ASAP.
-
AuthorPosts