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
This issue occur if a autoloaded resource is accessed via get_resource again. The problem occur in the function _update_container where the value is removed from contents. If accessing the same resource again, the resource is already loaded but has no contents.
I resolve this issue by adding the following lines to get_resource
if uri.normalize() in self.resources:
resource = self.resources[uri.normalize()]
if resource.contents:
return self.resources[uri.normalize()]
else:
# If not, we create a new resource
resource = self.create_resource(uri)
See the stack trace below, when that happens. The line numbers may be not 100% correct.
Thanks again for the issue, I'll check that asap. So the scenario is that there is an external resource that is automatically loaded (let say there is A.xmi that's loads objects from B.xmi) and when you access again the loaded resource from the resource set (so accessing B.xmi from the resource set) the content of this model is empty. That's it?
Sorry for the late answer... I started to try to reproduce your issue, but I cannot, mainly because I think the issue you have is directly related to the issue you raised in #113 (having the container object in a resource and the contained elements in another). I need to investigate further how EMF/Java reacts in those way, i.e, what will the contained object will answer if I ask who's its parent and which is its resource, to be compliant with that.
This issue occur if a autoloaded resource is accessed via get_resource again. The problem occur in the function _update_container where the value is removed from contents. If accessing the same resource again, the resource is already loaded but has no contents.
I resolve this issue by adding the following lines to get_resource
See the stack trace below, when that happens. The line numbers may be not 100% correct.
The text was updated successfully, but these errors were encountered: