| Summary: | It should be forbidden to create an association which is composite on both sides | ||
|---|---|---|---|
| Product: | [Modeling] Papyrus | Reporter: | Alain Le Guennec <alain.leguennec> |
| Component: | Core | Assignee: | Project Inbox <mdt-papyrus-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | cletavernier, eclipse-bugzilla, yann.tanguy |
| Version: | 0.8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Alain Le Guennec
Yann, is this something related to the service edit, or should it be handled directly from the property view ? In the second case, I can fix it. Fixed in r6276 (0.8.X) and r6277 (trunk). The service edit now set the opposite to none to avoid other ends to be composite. (In reply to comment #2) > Fixed in r6276 (0.8.X) and r6277 (trunk). > > The service edit now set the opposite to none to avoid other ends to be > composite. Fixed. Restriction added on involved property (must be an association end). Added in r6518 (0.8.X) and r6519 (trunk). I think we also have to consider the 'shared' aggregation kind, not only 'composite'. That is, a binary association can only be an aggregate (shared or composite) on one end. At the moment, the other end's aggregation is set to 'none' only when setting the first one to 'composite', not to 'shared'. Not sure about this, I did not manage to find such rule for shared aggragations in specifications (UML & SysML). Also note that the rule related to compositions is broader than what is currently implemented (check below) : "Compositions may be linked in a directed acyclic graph with transitive deletion characteristics; that is, deleting an element in one part of the graph will also result in the deletion of all elements of the subgraph below that element. Composition is represented by the isComposite attribute on the part end of the association being set to true." Thinking more about it, I don't think there is much difference between shared and composite with respect to that issue. The thing is, there should not be any cycle in the aggregation graph (composite implies a tree, shared implies a DAG). By very definition, any link for an association that is aggregate on both sides is such a cycle, isn't it? I agree the spec is not clear on this point, though.. (In reply to comment #7) > By very definition, any link for an association that is aggregate on both sides > is such a cycle, isn't it? Yes, composite on both side is a particular case of cycle. |