Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Compare revisions with transient features
[CDO] Compare revisions with transient features [message #530555] Fri, 30 April 2010 07:34 Go to next message
Yves Bontemps is currently offline Yves BontempsFriend
Messages: 14
Registered: March 2010
Junior Member
Hi,

I'm using CDO 2.0. I'm trying to determine the changes that have been applied to an object between two points in time, using auditing. I rely on CDORevision.compare(CDORevision origin) to get a delta but I get an ArrayIndexOutOfBoundException in CDORevisionDeltaImpl.compare( ... ) when my model includes transient features. Otherwise, it works fine.

I think that the problem is in the loop below in CDORevisionDeltaImpl, where count takes all features into account, but features contains only non-transient features.

private void compare(CDORevision originRevision, CDORevision dirtyRevision)
{
EStructuralFeature[] features = CDOModelUtil.getAllPersistentFeatures(eClass);
int count = eClass.getFeatureCount();
for (int i = 0; i < count; i++)

Any idea of easy workarounds (I tried using derived, non-transient features, but it has huge side-effects on the rest of my application) ?

Yves.


Cheers,

Yves.
Re: [CDO] Compare revisions with transient features [message #530558 is a reply to message #530555] Fri, 30 April 2010 07:44 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Ives,

This ahs already been fixed for both 2.0 and 3.0. Please try the latest
maintenance build: https://build.eclipse.org/hudson/job/emf-cdo-maintenance/

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 30.04.2010 09:34, schrieb Yves Bontemps:
> Hi,
>
> I'm using CDO 2.0. I'm trying to determine the changes that have been
> applied to an object between two points in time, using auditing. I
> rely on CDORevision.compare(CDORevision origin) to get a delta but I
> get an ArrayIndexOutOfBoundException in CDORevisionDeltaImpl.compare(
> ... ) when my model includes transient features. Otherwise, it works
> fine.
>
> I think that the problem is in the loop below in CDORevisionDeltaImpl,
> where count takes all features into account, but features contains
> only non-transient features.
>
> private void compare(CDORevision originRevision, CDORevision
> dirtyRevision)
> {
> EStructuralFeature[] features =
> CDOModelUtil.getAllPersistentFeatures(eClass);
> int count = eClass.getFeatureCount();
> for (int i = 0; i < count; i++)
>
> Any idea of easy workarounds (I tried using derived, non-transient
> features, but it has huge side-effects on the rest of my application) ?
>
> Yves.


Previous Topic:EMF.edit property source with GEF?
Next Topic:Schema evolution: reference to attribute
Goto Forum:
  


Current Time: Thu Apr 25 20:44:04 GMT 2024

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

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

Back to the top