Community
Participate
Working Groups
testCase is in CVS in (InitialTest) Created an attachment (id=78395) [details] TestCase - EContentAdapter My test case shows that when we call resource.eAdapters().add( contentAdapter ); It will load objects contains by the resource. But I`ve been notified!! The expected behavior would be not to load any objects. After calling Supplier supplier = (Supplier)transaction.getObject(supplierID); the adapter should be added at this point automatically. So I imagine that the only way to fix that problem using adapter would be to override some method... Even if I put adapter on each on them.... I found that I will have some overhead with this approach.. knowing I play with millions of objects... :-( ------- Comment #61 From Eike Stepper 2007-09-14 05:00:00 -0400 [reply] ------- (In reply to comment #60) I've committed your test case and I can see the point. This is certainly not what one would expect. There's a line (427) in EContentsEList: if (isIncluded(feature) && (!useIsSet() || eObject.eIsSet(feature))) where eIsSet() leads to LoadRevisionRequest in the end. I'm currently not sure what to do here. I'm a bit surprised that this code is called although you have overridden resolve() in your adapter. Can you please file a separate bug so that I don't forget about it?
Simon, I've added/implemented bug# 203511 to provide CDOTransactionHandlers. You're already in the CC.
In org.eclipse.emf.ecore.util.EContentsEList.FeatureIteratorImpl.hasNext() there's the following line: Object value = eObject.eGet(feature, resolve()); Tracing into this call I come to org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateMany.dynamicGet(InternalEObject, DynamicValueHolder, int, boolean, boolean) which calls org.eclipse.emf.internal.cdo.CDOObjectImpl.dynamicGet(int) but the resolve flag gets lost on this way. I have no way to determine whether to resolve in dynamicGet(). I'm currently not sure what to do. In the case you're happy with the new CDOTransactionHandler I'm tempted to close this bug with WONTFIX in favour to more important things. Of course it could be reopened later...
For the case of a multi-valued feature, dynamicGet returns the whole list and only when you fetch things from that list should you have to decide whether to resolve the proxy for the particular list item you fetch. So eGet for a many valued feature returns the same list regardless of the resolve argument.
I'm currently not sure what to do. Closing this bug with WONTFIX in favour to more important things. Of course it could be reopened later...
Reversioned due to graduation
Closing