Finding an EObject by id following containment proxy [message #686854] |
Tue, 10 May 2011 09:30 |
Dan Pollitt Messages: 55 Registered: August 2010 |
Member |
|
|
Hi,
I recently made a change to our model to allow cross-document
containment references.
One impact of this is that we were using Resource#getObject(String
uriFragment) on the resource of the container to locate an object by
it's ID (a UUID) - this no longer works as the contained object that is
now in it's own resource is not present in the idToEObject map inside
that resource (understandable).
One option to allow us to find the object is to use its URI and issue a
getEObject(URI uri, boolean loadOnDemand) on the ResourceSet - but
thought I'd check, are there any other alternatives (aside from
iterating over contents) that perhaps just need the object ID?
Thanks,
Dan
|
|
|
Powered by
FUDForum. Page generated in 0.02838 seconds