Relationship arrows wrong?

General discussions about code engineering

Moderator: Moderators

Re: Relationship arrows wrong?

Postby egiva » Fri Jun 17, 2011 12:39 am

Hello Scott,

I just tried aggregation, though, and it doesn't behave as expected. It makes me think that composite relationship won't either..

You need to delete existing attribute mr in order to get it recreated as association. You can select check box "Reset already created fields" in Reverse Options dialog either, but for this you will need to change reverse mode to Change model according to code. Maybe easiest way could be just to pick up attribute in UML class and drag it outside the class on diagram pane - it automatically create association. Note, that reverse engineering doesn't create attributes with composite or shared aggregation kind. It is object level information, but reverse engineering analyses only class structure. You can apply this information in model additionally.
Best Regards,
Egidijus Vaisnora
egiva
Customer Support
Customer Support
 
Posts: 37
Posts Rating:0
Joined: Tue Jan 05, 2010 6:32 am

Re: Relationship arrows wrong?

Postby smadirondack » Wed Jun 22, 2011 12:59 pm

You need to delete existing attribute mr in order to get it recreated as association. You can select check box "Reset already created fields" in Reverse Options dialog either, but for this you will need to change reverse mode to Change model according to code. Maybe easiest way could be just to pick up attribute in UML class and drag it outside the class on diagram pane - it automatically create association. Note, that reverse engineering doesn't create attributes with composite or shared aggregation kind. It is object level information, but reverse engineering analyses only class structure. You can apply this information in model additionally.


Thank you for this information. I like the feature that creates a relationship arrow when dragging the attribute outside the class. I have a question related to that and the comment you made about composite and shared aggregation.

Q: After dragging an attribute out of the class and onto the diagram pane the arrow is a directed arrow. How can I manually change that to a composite arrow or an aggregation arrow?

Thank you,
Scott Mitchell
smadirondack
Forum Newbie
Forum Newbie
 
Posts: 14
Posts Rating:0
Joined: Fri Jun 03, 2011 1:09 pm

Re: Relationship arrows wrong?

Postby rasmil » Thu Jun 23, 2011 7:20 am

Hello,

There are few ways to change the kind of aggregation:
- through context menu. Select the association relationship on the diagram pane. Right-click to open the association shortcut menu. Select appropriate "Role [name] of" and then select either the Shared or Composite options.
- through specification dialog. Open the specification of association relationship. Select and expand the Roles branch (right pane). Select the appropriate Property and select the option in Aggregation field.

If you have more questions or problems feel free to contact us.
Best Regards,
Rasa Sumauskiene
rasmil
Customer Support
Customer Support
 
Posts: 24
Posts Rating:1
Joined: Mon Sep 13, 2010 6:57 am

Previous

Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests