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 |
|
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 |
|
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
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| |
Goto Forum:
Current Time: Wed Apr 24 16:15:01 GMT 2024
Powered by FUDForum. Page generated in 0.03658 seconds
|