|
Re: EMF Ecore - EOpposite relation to self [message #933001 is a reply to message #932946] |
Thu, 04 October 2012 16:40 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Miklós,
Comments below.
On 04/10/2012 5:43 PM, Miklós Földényi wrote:
> I am pretty new to EMF Ecore modelling and I have come across a problem that my usual Googling did not help with.
>
> Assume an object (referred to as "SomeObject") that can be connected to an arbitrary number of other "SomeObject"s. This relation is bi-directional, and I would like to have EMF maintain it for me.
>
> For this to model, I defined an additional class (referred to as "ConnectionPoint") that is contained by "SomeObject", and has a reference to the parenting "SomeObject" and an other "ConnectionPoint" object.
>
> This last reference is where I am stuck. As I understand, bi-directional links are defined by having 2 EReferences refer each other as EOpposites, however, in this case there is only 1 link, and itself should be it's own EOpposite. The editor does not offer this as an option.
That's not supported. You'd need to define something more like
outgoingConnection and incomingConnection and pair those two...
>
> How can I go about tagging this relation as being it's own opposite? Or is it not possible and should be modeled using some pattern I haven't come across yet?
>
> The ECore model diagram:
>
>
> Any help is welcome! :)
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03886 seconds