Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EReference Containment
EReference Containment [message #646161] Wed, 22 December 2010 13:17 Go to next message
Arun  is currently offline Arun Friend
Messages: 16
Registered: October 2010
Junior Member
Hi All,

Can someone kindly explain to me the difference between a EClass (say Class1) that has an EReference (REF_X of EType Class2) with Containment set to true and an EClass (Class1) that has an EReference (REF_X of EType Class2 and opposite to REF_Y (of type Class1) of Class2) with Contaiment set to true.

Both of them give the same result in the model. I was wondering if someone could explain me the difference.

Kind regards
Arun

[Updated on: Wed, 22 December 2010 13:18]

Report message to a moderator

Re: EReference Containment [message #646195 is a reply to message #646161] Wed, 22 December 2010 15:53 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 22.12.2010 14:17, schrieb Arun:
> Hi All,
>
> Can someone kindly explain to me the difference between a EClass (say Class1) that has an EReference (REF_X of EType Class2) with Containment set to true and an EClass (Class1) that has an EReference (REF_X of EType Class2 and opposite to REF_Y (of type Class1) of Class2).
> Both of them give the same result in the model. I was wondering if someone could explain me the difference.
You see the difference when you add an element of REF_X to a second reference that has containment=true. Generally an object can be contained by at most one container. This is ensured because the framework automatically removes objects from their old container.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:Inheritance between to model plugins
Next Topic:Globalization of generated code for EMF Model
Goto Forum:
  


Current Time: Tue Apr 23 16:28:36 GMT 2024

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

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

Back to the top