Home » Modeling » Papyrus » unidirection Association in class Diagramm(How to create unidirection association in class Diagramm? Default is bidirectional.)
|Re: unidirection Association in class Diagramm [message #1155153 is a reply to message #1155001]
||Fri, 25 October 2013 18:32
|| Christian W. Damus
Registered: July 2009
The Properies view lets you edit the navigability and other attributes
of the association's ends. So, you can just draw the association and
then make the appropriate end(s) non-navigable.
On 2013-10-25 17:15:44 +0000, Martin Heinrich said:
> When I create an Association between two classes, I get always a
> bidirectional association, so that there are roles at every class.
> But I want to create only an unidirectional association, where one
> class has an instance of the other, but the other class doesn't have an
> instance of this class. How can this be achieved?
> Best Regards,
|Re: unidirection Association in class Diagramm [message #1160588 is a reply to message #1160569]
||Tue, 29 October 2013 08:13
| Camille Letavernier
Registered: February 2011
Both are roles. But depending on your code generation and target platform, they may or may not appear in the final product.
In a Database, for examples, some Associations are represented as Tables. The table typically needs the two ends. In a Java Class, associations are represented as Attributes (And sometimes, specific collections to ensure consistency with the opposite end).
My point is that the UML Model is (should be) an abstraction. It will always contain extra information (Useful in some specific cases, useless in other). So, there's no universal answer.
But for the simplest code generator, "owned by association" often means "ignored"; which is, if I understand correctly, what you want.
Current Time: Tue Feb 21 21:33:07 GMT 2017
Powered by FUDForum
. Page generated in 0.03312 seconds