Bug 498296 - Models with hrefs to itself in containment references cause duplicate elements
Summary: Models with hrefs to itself in containment references cause duplicate elements
Status: NEW
Alias: None
Product: Epsilon
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Dimitris Kolovos CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-21 12:09 EDT by Horacio Hoyos CLA
Modified: 2016-07-21 12:11 EDT (History)
1 user (show)

See Also:


Attachments
The test porject (1.48 KB, application/zip)
2016-07-21 12:11 EDT, Horacio Hoyos CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Horacio Hoyos CLA 2016-07-21 12:09:59 EDT
If an EMF model uses href to point to elements in the same model in a containemnt reference, after loading elements in the model appear multiple times, once for the element it self, and once for the href to it.
In my model there are two elements in the root, and the first contains the second. Since the element is at the root, the containment is done via an href.

The second element can be at the root because it has 2 different ways to be contained. 

I have attached a project with the test model, metamodel and EOL script.
I am expecting to only have 1 Member, but the loop over all members sees two. 

In an ETL transforamtion the behaviour is more strange. In the first stage two output elements are created, one for each Member. However, during rule execution I guess the cache knows that the element has been already transformed and the second "virtual" instance is not transformed. Hence, the output model has two output elements, but one is "empty" as the rule never executed for the "virtual" one.
Comment 1 Horacio Hoyos CLA 2016-07-21 12:11:02 EDT
Created attachment 263247 [details]
The test porject