[CDO] Compare revisions with transient features [message #530555] |
Fri, 30 April 2010 07:34 |
Yves Bontemps 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 |
|
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.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.02822 seconds