Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » cdo remove delta
cdo remove delta [message #687146] Tue, 07 June 2011 08:40 Go to next message
Ronald Krijgsheld is currently offline Ronald KrijgsheldFriend
Messages: 41
Registered: November 2010
Member
Hi All,

We are using a version of CDO from a few months ago. We now run into the
following problem. The CDORemoveFeatureDeltaImpl is index based. How is
it possible to always remove the correct element when an update is
received from the server. At the moment I think sometimes the wrong
element is changed because the updates from the server has changed the
underlying list and applying the CDORemoveDelta removes the wrong element.

Is this code still used in the current version of CDO?

Thanks,

Ronald
Re: cdo remove delta [message #687147 is a reply to message #687146] Tue, 07 June 2011 08:55 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 07.06.2011 10:40, schrieb Ronald Krijgsheld:
>
> Hi All,
>
> We are using a version of CDO from a few months ago. We now run into the following problem. The CDORemoveFeatureDeltaImpl is index based.
What exactly is that problem?

> How is it possible to always remove the correct element when an update is received from the server.
Is that a question? I don't understand it ;-(

> At the moment I think sometimes the wrong element is changed because the updates from the server has changed the underlying list and applying the CDORemoveDelta removes the wrong element.
What makes you think that?

>
> Is this code still used in the current version of CDO?
You neither specified what code nor what version you're using exactly. It's best that you use Eclipse's team functions to compare the piece of code you're looking at.

Cheers
/Eike

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


Re: cdo remove delta [message #687148 is a reply to message #687147] Tue, 07 June 2011 09:06 Go to previous message
Ronald Krijgsheld is currently offline Ronald KrijgsheldFriend
Messages: 41
Registered: November 2010
Member
Maybe I was not quite clear :)

The merge is using the CDORevisionMerger. The merge is at some point
executing

@Override
public void visit(CDORemoveFeatureDelta delta)
{
revision.remove(delta.getFeature(), delta.getIndex());
}

this code is executed after the updates received from the server are
processed. The index in the delta is not adjusted.

I did some tests on and this will definitely delete the wrong element.
However this code is deprecated(I think). So if that's the case we need
have to decide what to about do. Keep current CDO and try to fix or upgrade.

Thanks,

Ronald


On 7-6-2011 10:55, Eike Stepper wrote:
> Am 07.06.2011 10:40, schrieb Ronald Krijgsheld:
>>
>> Hi All,
>>
>> We are using a version of CDO from a few months ago. We now run into
>> the following problem. The CDORemoveFeatureDeltaImpl is index based.
> What exactly is that problem?
>
>> How is it possible to always remove the correct element when an update
>> is received from the server.
> Is that a question? I don't understand it ;-(
>
>> At the moment I think sometimes the wrong element is changed because
>> the updates from the server has changed the underlying list and
>> applying the CDORemoveDelta removes the wrong element.
> What makes you think that?
>
>>
>> Is this code still used in the current version of CDO?
> You neither specified what code nor what version you're using exactly.
> It's best that you use Eclipse's team functions to compare the piece of
> code you're looking at.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
Re: cdo remove delta [message #687393 is a reply to message #687146] Tue, 07 June 2011 08:55 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 07.06.2011 10:40, schrieb Ronald Krijgsheld:
>
> Hi All,
>
> We are using a version of CDO from a few months ago. We now run into the following problem. The CDORemoveFeatureDeltaImpl is index based.
What exactly is that problem?

> How is it possible to always remove the correct element when an update is received from the server.
Is that a question? I don't understand it ;-(

> At the moment I think sometimes the wrong element is changed because the updates from the server has changed the underlying list and applying the CDORemoveDelta removes the wrong element.
What makes you think that?

>
> Is this code still used in the current version of CDO?
You neither specified what code nor what version you're using exactly. It's best that you use Eclipse's team functions to compare the piece of code you're looking at.

Cheers
/Eike

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


Re: cdo remove delta [message #687394 is a reply to message #687147] Tue, 07 June 2011 09:06 Go to previous message
Ronald Krijgsheld is currently offline Ronald KrijgsheldFriend
Messages: 41
Registered: November 2010
Member
Maybe I was not quite clear :)

The merge is using the CDORevisionMerger. The merge is at some point
executing

@Override
public void visit(CDORemoveFeatureDelta delta)
{
revision.remove(delta.getFeature(), delta.getIndex());
}

this code is executed after the updates received from the server are
processed. The index in the delta is not adjusted.

I did some tests on and this will definitely delete the wrong element.
However this code is deprecated(I think). So if that's the case we need
have to decide what to about do. Keep current CDO and try to fix or upgrade.

Thanks,

Ronald


On 7-6-2011 10:55, Eike Stepper wrote:
> Am 07.06.2011 10:40, schrieb Ronald Krijgsheld:
>>
>> Hi All,
>>
>> We are using a version of CDO from a few months ago. We now run into
>> the following problem. The CDORemoveFeatureDeltaImpl is index based.
> What exactly is that problem?
>
>> How is it possible to always remove the correct element when an update
>> is received from the server.
> Is that a question? I don't understand it ;-(
>
>> At the moment I think sometimes the wrong element is changed because
>> the updates from the server has changed the underlying list and
>> applying the CDORemoveDelta removes the wrong element.
> What makes you think that?
>
>>
>> Is this code still used in the current version of CDO?
> You neither specified what code nor what version you're using exactly.
> It's best that you use Eclipse's team functions to compare the piece of
> code you're looking at.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
Previous Topic:(no subject)
Next Topic:org.eclipse.emf.teneo.hibernate jars signing
Goto Forum:
  


Current Time: Tue Apr 23 09:42:52 GMT 2024

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

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

Back to the top