EMF sometimes doesn't resolve Proxy [message #1064710] |
Thu, 20 June 2013 15:29 |
|
Goodevening everyone,
I've got two reference to the same EObject, one with containment true one with containment false.
The situation is this:
Object A, B and C
Object A ---containment=true--->B
Object C ---containment=false--->B
So the XMI looks like this:
<Object A id="AAA">
<listOfB>
<Object B id="BB1" />
<Object B id="BB2" />
</listOfB>
</Object A>
....
<Object C id="CCC">
<listOfB>
<href="#BB1" />
</listOfB>
</Object A>
Then, I load the resource and if I try to get object BB1 from objectA.getListOfB.get(0) I've got real Object B, but if try to do the same with ObjectC:
objectC.getListOfB.get(0) I've got a Proxy.
The only way to receive real object B that I've found is:
objectC.eResource().getEObject(EcoreUtil.getURI(objectC.getListOfB.get(0)).fragment());
Why this?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02651 seconds