|Re: [Edapt] XML parsing issue when migrating older model [message #1790998 is a reply to message #1790913]
||Thu, 21 June 2018 08:45
| Gernot Krause
Registered: June 2014
I was able to nail the problem down:
Actually, the load options will not stay empty. There will be a merge with the default load options which contain the EXTENDED_META_DATA=true flag. So this was not the problem.
The validation fails when it checks classes that are contained via a feature map in the ecore model. The containment check is done in the MigrationValidator.validate_validContainment() method:
My model looks like this:
The classes TestA, TestB, TestC have BaseTest as super type. The class TestRun has a bi-directional relation to BaseTest but no containment. The BaseTest - or better - the respective Test* classes are contained by class Experiment via a feature map.
When the valid containment check runs, i.e. TestA is passed as the instance. In line 278 the call instance.getReferences() returns all references from other classes to the TestA instance. Using the debugger I can see that all references from TestRun to TestA are returned. However, none of these is a containment.
Unfortunately, the (containment) reference from Experiment to TestA is not returned. Thus, since TestA is also not directly contained by a resource (lines 284-290) the method finally returns valid=false.
Obviously, the references from feature maps are not considered in this containment check. Bug or feature?
Thanks for your help.
Powered by FUDForum
. Page generated in 0.01948 seconds