Is it possible to commit information about round trip (used by VP UML engine)? Indeed, each time I commit generated classes, I have to reverse those ones in VP-UML whereas they are still available as class diagrams in VP.
The problem is, during the reverse engineering, VP engine interprets acquaintances (aggregation or composite). As a consequence, attributes are added in class diagrams in addition to acquaintances (which pose problems during the ORM generation…)
Thank you for your understanding,
Thanks for your post. We are sorry that we only support commit project file to SVN. But actually if you reversed classes to the project, generated class diagram with the reversed classes and commit the project, it should be fine that you will see the class diagram with the reversed classes when you re-open the revision.
About reversing acquaintances (aggregation or composite) as attributes, may I know did you reversed the generated ORM code by round-trip engineering/Instant Reverse?
In fact the problem is when you created 2 classes linked with an aggregation, during the code generation the role name of the link become the attribute name of the class which aggregates the other one.
Ex: A----<>B, att1 become an attribute name of class A.
However, when you use the reverse round trip, VPUML will add you an attribute on the class diagram A but the acquaintance will still be available (redundancy).
Now if I apply an ORM persistable stereotype on A and B and I generate database tables then VPUML will say that the link role name is in conflict with the attribute name.
That’s why I asked if it’s possible to keep the round trip information in svn in order to not have to reverse the java classes into class diagrams.
Thank you for your time,
Thanks for replying. As ORM does not allow non-primitive type on attribute, the attributes which represent the relationship (aggregation or composite in your case) is duplicated with the relationship when generate ORM code. You need to fix the issue by remove the attribute, and make sure the association is persistable. Then it will be fine to generate ORM code.
Do you know why I do not see the relation between two classes when I use the reverse round trip. In fact, the relation is present in the class specifications but not visible on the chart.
The only way I found to show it is to delete the class from the class diagram view and to drop it from the class repository.
Is there any options in VPUML to refresh the diagram ?
Thanks for your reply. We do not show the relationship on diagram when reverse in order to avoid messy diagram. Please try to right-click on the class and select Relations Elements > Visualize Related Model Element in the popup menu, then select the relationship to visualize it on the diagram.
Hope this helps. If this does not help solving your problem, could you please give us a sample source so we can try the reverse result? Thanks in advance!
Perfect, it’s exactly what I wanted.
You are welcome.