Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EOpposite on derived EReferences
EOpposite on derived EReferences [message #1091236] Wed, 21 August 2013 08:09 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
Hi,

I have an Ecore model similar to this one:

Person
- appartments: Appartment [derived]

AppartmentRegistration
- appartment: Appartment
- person: Person

Appartment:
- person: Person [derived]

The two derived features are computed from all available
AppartmentRegistrations.

Now, I translate this model to one where "AppartmentRegistration" is
removed, and the two features are no longer derived, Persons/Appartments
would reference themselves directly. I would now set the two features
additionally as eOpposites in the target model.

Would it do any harm if they were already set as eOpposites in the
source model, even if they are derived? This way I wouldn't have to
touch the eOpposite feature when copying the references from the source
to the target model.


Felix
Re: EOpposite on derived EReferences [message #1091391 is a reply to message #1091236] Wed, 21 August 2013 12:44 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Felix,

If these references are both derived and not changeable, I think
there's no harm in making them mutual opposites. The UML metamodel
does this all over the place (e.g., Element::ownedElement <-->
Element::owner)

cW


On 2013-08-21 08:09:56 +0000, Felix Dorner said:

> Hi,
>
> I have an Ecore model similar to this one:
>
> Person
> - appartments: Appartment [derived]
>
> AppartmentRegistration
> - appartment: Appartment
> - person: Person
>
> Appartment:
> - person: Person [derived]
>
> The two derived features are computed from all available
> AppartmentRegistrations.
>
> Now, I translate this model to one where "AppartmentRegistration" is
> removed, and the two features are no longer derived,
> Persons/Appartments would reference themselves directly. I would now
> set the two features additionally as eOpposites in the target model.
>
> Would it do any harm if they were already set as eOpposites in the
> source model, even if they are derived? This way I wouldn't have to
> touch the eOpposite feature when copying the references from the source
> to the target model.
>
>
> Felix
Previous Topic:Hello World CDO ?
Next Topic:xml value setting into the EMF model
Goto Forum:
  


Current Time: Thu Apr 25 08:09:42 GMT 2024

Powered by FUDForum. Page generated in 0.02860 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top