Skip to main content



      Home
Home » Modeling » EMF » [CDO] Notification#getOldValue always null?
[CDO] Notification#getOldValue always null? [message #769644] Thu, 22 December 2011 08:07 Go to next message
Eclipse UserFriend
Hi All,

I'm observing that when I add an Adapter to an object and then somewhere
else change the change the value of a reference from one object to
another, that the notification that comes to my adapter always has
getOldValue() as null. Identifying the newValue and the notifier works fine.

I am observing the changed object as retrieved through a CDOView with:

view.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);

I am setting the reference in a CDOTransaction in the same VM.
The adapters view has already loaded the object being adapted as well as
the old and new reference objects.

Is this expected? Perhaps this is something I need to configure? I need
the old value in order to perform some fine-grained updates on a JFace
Viewer.

Thanks,
Dan
Re: [CDO] Notification#getOldValue always null? [message #769653 is a reply to message #769644] Thu, 22 December 2011 08:27 Go to previous messageGo to next message
Eclipse UserFriend
Does
CDOView.Options.setInvalidationPolicy(CDOInvalidationPolicy.RELAXED) help?

Tom

Am 22.12.11 14:07, schrieb Dan Pollitt:
> Hi All,
>
> I'm observing that when I add an Adapter to an object and then somewhere
> else change the change the value of a reference from one object to
> another, that the notification that comes to my adapter always has
> getOldValue() as null. Identifying the newValue and the notifier works
> fine.
>
> I am observing the changed object as retrieved through a CDOView with:
>
> view.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
>
> I am setting the reference in a CDOTransaction in the same VM.
> The adapters view has already loaded the object being adapted as well as
> the old and new reference objects.
>
> Is this expected? Perhaps this is something I need to configure? I need
> the old value in order to perform some fine-grained updates on a JFace
> Viewer.
>
> Thanks,
> Dan
Re: [CDO] Notification#getOldValue always null? [message #769660 is a reply to message #769653] Thu, 22 December 2011 08:46 Go to previous messageGo to next message
Eclipse UserFriend
No - looks to behave in the same way. I also tried setting on the session:

((org.eclipse.emf.cdo.net4j.CDOSession.Options) session.options())
.setPassiveUpdateMode(PassiveUpdateMode.CHANGES);

That didn't seem to change the observed behaviour either.

I'm using org.eclipse.emf.cdo version 4.0.1.v20110831-1303

Dan

On 22/12/2011 13:27, Tom Schindl wrote:
> Does
> CDOView.Options.setInvalidationPolicy(CDOInvalidationPolicy.RELAXED) help?
>
> Tom
>
> Am 22.12.11 14:07, schrieb Dan Pollitt:
>> Hi All,
>>
>> I'm observing that when I add an Adapter to an object and then somewhere
>> else change the change the value of a reference from one object to
>> another, that the notification that comes to my adapter always has
>> getOldValue() as null. Identifying the newValue and the notifier works
>> fine.
>>
>> I am observing the changed object as retrieved through a CDOView with:
>>
>> view.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
>>
>> I am setting the reference in a CDOTransaction in the same VM.
>> The adapters view has already loaded the object being adapted as well as
>> the old and new reference objects.
>>
>> Is this expected? Perhaps this is something I need to configure? I need
>> the old value in order to perform some fine-grained updates on a JFace
>> Viewer.
>>
>> Thanks,
>> Dan
>
Re: [CDO] Notification#getOldValue always null? [message #772257 is a reply to message #769644] Thu, 29 December 2011 06:05 Go to previous messageGo to next message
Eclipse UserFriend
Hi Dan,

Can you please submit a bugzilla?

Cheers
/Eike

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



Am 22.12.2011 14:07, schrieb Dan Pollitt:
> Hi All,
>
> I'm observing that when I add an Adapter to an object and then somewhere else change the change the value of a
> reference from one object to another, that the notification that comes to my adapter always has getOldValue() as null.
> Identifying the newValue and the notifier works fine.
>
> I am observing the changed object as retrieved through a CDOView with:
>
> view.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
>
> I am setting the reference in a CDOTransaction in the same VM.
> The adapters view has already loaded the object being adapted as well as the old and new reference objects.
>
> Is this expected? Perhaps this is something I need to configure? I need the old value in order to perform some
> fine-grained updates on a JFace Viewer.
>
> Thanks,
> Dan
Re: [CDO] Notification#getOldValue always null? [message #774142 is a reply to message #772257] Tue, 03 January 2012 05:55 Go to previous message
Eclipse UserFriend
Hi Eike,

Happy New Year, just to confirm I raised
https://bugs.eclipse.org/bugs/show_bug.cgi?id=367738 for this


Thanks,
Dan

On 29/12/2011 11:05, Eike Stepper wrote:
> Hi Dan,
>
> Can you please submit a bugzilla?
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Am 22.12.2011 14:07, schrieb Dan Pollitt:
>> Hi All,
>>
>> I'm observing that when I add an Adapter to an object and then
>> somewhere else change the change the value of a reference from one
>> object to another, that the notification that comes to my adapter
>> always has getOldValue() as null. Identifying the newValue and the
>> notifier works fine.
>>
>> I am observing the changed object as retrieved through a CDOView with:
>>
>> view.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
>>
>> I am setting the reference in a CDOTransaction in the same VM.
>> The adapters view has already loaded the object being adapted as well
>> as the old and new reference objects.
>>
>> Is this expected? Perhaps this is something I need to configure? I
>> need the old value in order to perform some fine-grained updates on a
>> JFace Viewer.
>>
>> Thanks,
>> Dan
Previous Topic:Trouble adding an EDatatype of an EAttribute
Next Topic:Using CDO in my RCP application
Goto Forum:
  


Current Time: Thu Jul 24 16:55:18 EDT 2025

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

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

Back to the top