You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have loaded a resource set which consists of two resource files. I did some modification in one file and than I store it again.
This was already working but suddenly it dont work any more. When i dive into the code, I found out the following:
As far as I understood, during loading of the first resource file an EProxy is generated for the link to an object into the other resource file. When loading the second resource the dedicated object is created and linked to the EProxy.
During serialization of the second resource, an error occur in the function eURIFragment.
The problem in my case was that parent.__getattribute__(name).index(self) raises an IndexError. The parent seems to be part of the first resource and therefore an EProxy object is part of the Orderset. But self is the dedicated object and therefore could not be found.
If I try to determine the index via a loop like this
for idx, element in enumerate(parent.__getattribute__(name)):
if isinstance(element, EProxy) and not isinstance(self, EProxy):
if self == element._wrapped:
index = idx
break
else:
if self == element:
index = idx
break
it works.
I don't know if this case could be captured at the beginning of the function. I'm wondering why this was working if I have done less modification.
If you need more information, please let me know.
Best regards,
Andreas
The text was updated successfully, but these errors were encountered:
Thanks again for your ticket and for a fix! I will try it. The thing is that objects that have their container in another resource is not so easy to deal with. EMF have a behavior for it that is still a little bit strange to me (for example, what happens if an object is contained in an object in a resource B, but another object has a containement relationship toward the same instance in a resource A).
Thanks a lot of all your scenarios, they will improve the test data set for sure!
I have loaded a resource set which consists of two resource files. I did some modification in one file and than I store it again.
This was already working but suddenly it dont work any more. When i dive into the code, I found out the following:
As far as I understood, during loading of the first resource file an EProxy is generated for the link to an object into the other resource file. When loading the second resource the dedicated object is created and linked to the EProxy.
During serialization of the second resource, an error occur in the function eURIFragment.
The problem in my case was that
parent.__getattribute__(name).index(self)
raises an IndexError. The parent seems to be part of the first resource and therefore an EProxy object is part of the Orderset. Butself
is the dedicated object and therefore could not be found.If I try to determine the index via a loop like this
it works.
I don't know if this case could be captured at the beginning of the function. I'm wondering why this was working if I have done less modification.
If you need more information, please let me know.
Best regards,
Andreas
The text was updated successfully, but these errors were encountered: