Community
Participate
Working Groups
Having 2 CDOResources, a first one containing a model element 'A' referencing another model element 'B' contained in second CDOResource, model element 'B' contains a child. Open a transaction, setting up a EContentAdapter and a ECrossReferenceAdapter on the ResourceSet of the transaction and calling CDOTransaction.getResource() on the first resource, we can see that EContentAdapter and ECrossReferenceAdapter are not added to child of model element 'B' in legacy while it works fine in native.
See https://git.eclipse.org/r/37802 for the test showing the bug.
The issue comes from that when ECrossReferenceAdapter analyze cross references from model element 'A' to model element 'B', in legacy CDOLegacyWrapper.cdoInternalPostLoad() is called to create a CDOObject of model element 'B'. Then CDOLegacyWrapper.revisionToInstance() is called to initialize field of EObject instance. But as we try to initialize resource and container fields before feature fields, the model element 'B' CDOObject is not fully constructed than we have EContentAdapter which access its feature fields and conclude that model element 'B' hasn't children. It is CDOLegacyWrapper.getEObjectFromPotentialID() which trigger load of second CDOResource when called through CDOLegacyWrapper. I have updated the Gerrit to include a fix in CDOLegacyWrapper.revisionToInstance() to manage feature fields before resource/container fields. But a better fix would be to have legacy object loaded/constructed before behind registred in CDOViewImpl.objects cache and not have its construction trigger other object load/construction from CDOLegacyWrapper.getEObjectFromPotentialID(). Perhaps we should create proxy for these fieds at least for resource one.
With Bug 392720 fixed, i.e. have support of EMF proxy in CDO, we could fix correctly that.
We must care of not breaking fix of Bug 393164 i.e. support of Resource$Internal.isLoading() contract in legacy.
Moving all open bugzillas to 4.5.
Moving all unaddressed bugzillas to 4.6.
Moving all open bugs to 4.7
Moving all unresolved issues to version 4.8-
Moving all unresolved issues to version 4.9
Moving to 4.13.