Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Move operations make the moved element dirty
[CDO] Move operations make the moved element dirty [message #720747] Wed, 31 August 2011 07:29 Go to next message
Alex Lagarde is currently offline Alex LagardeFriend
Messages: 193
Registered: May 2010
Senior Member

Hi everyone !

When I move a CDOObject e1 from its container (c1) to a new container (c2) :
- c1 is modified (and revision is increased) : ok, we modify its
children list by removing e1
- the same for c2 : we modify its children list by adding e2
- what I don't get is why e1 is also modified : according to me,
CDOStoreImpl.setContainer() should not increase revision of the child,
as we do not modify its features.

Do you have any reason to do so ?

Here is a stack trace (from maintenance branch CDO 4.0) that shows that
e1 is considered as modified by the CDOStateMachine
     CDOStateMachine.writeWithoutViewLock(InternalCDOObject, 
CDOFeatureDelta) line: 330
     CDOStateMachine.write(InternalCDOObject, CDOFeatureDelta) line: 321
     CDOStoreImpl.getRevisionForWriting(InternalCDOObject, 
CDOFeatureDelta) line: 686
     CDOStoreImpl.setContainer(InternalEObject, CDOResource, 
InternalEObject, int) line: 111
     WheelImpl(CDOObjectImpl).eBasicSetContainer(InternalEObject, int) 
line: 1016
     WheelImpl(CDOObjectImpl).eBasicSetContainer(InternalEObject, int, 
NotificationChain) line: 655
     WheelImpl(BasicEObjectImpl).eInverseAdd(InternalEObject, int, 
Class<?>, NotificationChain) line: 1423
 
EStoreEObjectImpl$BasicEStoreEList<E>(DelegatingEcoreEList<E>).inverseAdd(E, 
NotificationChain) line: 398
 
EStoreEObjectImpl$BasicEStoreEList<E>(DelegatingNotifyingListImpl<E>).addUnique(E) 
line: 285
     EStoreEObjectImpl$BasicEStoreEList<E>(AbstractEList<E>).add(E) 
line: 307


Thanks !
Alex
Re: [CDO] Move operations make the moved element dirty [message #720767 is a reply to message #720747] Wed, 31 August 2011 08:04 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Alex,

The container is kind of a feature in CDO and its modification creates a CDOContainerFeatureDelta which definitely needs
to be stored.

Cheers
/Eike

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



Am 31.08.2011 09:29, schrieb Alex Lagarde:
> Hi everyone !
>
> When I move a CDOObject e1 from its container (c1) to a new container (c2) :
> - c1 is modified (and revision is increased) : ok, we modify its children list by removing e1
> - the same for c2 : we modify its children list by adding e2
> - what I don't get is why e1 is also modified : according to me, CDOStoreImpl.setContainer() should not increase
> revision of the child, as we do not modify its features.
>
> Do you have any reason to do so ?
>
> Here is a stack trace (from maintenance branch CDO 4.0) that shows that e1 is considered as modified by the
> CDOStateMachine
>
>     CDOStateMachine.writeWithoutViewLock(InternalCDOObject, CDOFeatureDelta) line: 330
>     CDOStateMachine.write(InternalCDOObject, CDOFeatureDelta) line: 321
>     CDOStoreImpl.getRevisionForWriting(InternalCDOObject, CDOFeatureDelta) line: 686
>     CDOStoreImpl.setContainer(InternalEObject, CDOResource, InternalEObject, int) line: 111
>     WheelImpl(CDOObjectImpl).eBasicSetContainer(InternalEObject, int) line: 1016
>     WheelImpl(CDOObjectImpl).eBasicSetContainer(InternalEObject, int, NotificationChain) line: 655
>     WheelImpl(BasicEObjectImpl).eInverseAdd(InternalEObject, int, Class<?>, NotificationChain) line: 1423
>
> EStoreEObjectImpl$BasicEStoreEList<E>(DelegatingEcoreEList<E>).inverseAdd(E, NotificationChain) line: 398
>
> EStoreEObjectImpl$BasicEStoreEList<E>(DelegatingNotifyingListImpl<E>).addUnique(E) line: 285
>     EStoreEObjectImpl$BasicEStoreEList<E>(AbstractEList<E>).add(E) line: 307
> 

>
> Thanks !
> Alex


Re: [CDO] Move operations make the moved element dirty [message #720786 is a reply to message #720767] Wed, 31 August 2011 08:35 Go to previous message
Alex Lagarde is currently offline Alex LagardeFriend
Messages: 193
Registered: May 2010
Senior Member

Ok, well from an CDO-external viewpoint this seems a bit odd, but we
will do with this.

Thanks as usual for your fast reply :)
Alex
Previous Topic:[Compare] Differences found on identical xmi files
Next Topic:FeatureMap, SetCommand, and dynamic attributes
Goto Forum:
  


Current Time: Wed Apr 24 16:15:01 GMT 2024

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

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

Back to the top