[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please have a look to the support pages of our website : http://m2doc.org/support/
Current behavior
In some cases, the validation fails to understand legit containment situations and throws INFO: Empty collection: Nothing will be left after calling ... or ERROR: Nothing will be left after calling ...
Minimal reproduction of the problem with instructions
In a Capella model with additional metamodel URIs http://www.polarsys.org/capella/common/re/1.4.0 and http://www.polarsys.org/kitalpha/emde/1.0.0, the following query
self.eAllContents(re::CatalogElementLink)
with self being an instance of SystemEngineering, throws the following log:
INFO: Empty collection: Nothing will be left after calling eAllContents: EClassifier=SystemEngineering can't contain EClassifierLiteral=CatalogElementLink direclty or indirectly (4, 41)
and returns an empty collection.
In the same context, the query self.eAllContents->filter(re::CatalogElementLink) works as expected.
Reversely, self.eAllContents->filter(re::CatalogElementLink).eContainer(capellamodeller::Project) throws error ERROR: Nothing will be left after calling eContainer: EClassifierLiteral=Project can't contain directly or indirectly EClassifier=CatalogElement.
Note that for some types of the "re" metamodel, the initial call to eAllContents works as expected (e.g. ReAbstractElement, ReNamedElement, etc.), and for others it produces the error above.
This issue is related to this one, it comes from AQL and has been fixed in AQL 8.x. I don't think I'll back port this to AQL 7.x since Sirius is moving to AQL 8.x for it's next release.
When M2Doc moves to AQL 8.x we need to check this.
I'm submitting a...
Current behavior
In some cases, the validation fails to understand legit containment situations and throws
INFO: Empty collection: Nothing will be left after calling ...
orERROR: Nothing will be left after calling ...
Minimal reproduction of the problem with instructions
In a Capella model with additional metamodel URIs
http://www.polarsys.org/capella/common/re/1.4.0
andhttp://www.polarsys.org/kitalpha/emde/1.0.0
, the following queryself.eAllContents(re::CatalogElementLink)
with self being an instance of SystemEngineering, throws the following log:INFO: Empty collection: Nothing will be left after calling eAllContents: EClassifier=SystemEngineering can't contain EClassifierLiteral=CatalogElementLink direclty or indirectly (4, 41)
and returns an empty collection.In the same context, the query
self.eAllContents->filter(re::CatalogElementLink)
works as expected.Reversely,
self.eAllContents->filter(re::CatalogElementLink).eContainer(capellamodeller::Project)
throws errorERROR: Nothing will be left after calling eContainer: EClassifierLiteral=Project can't contain directly or indirectly EClassifier=CatalogElement
.Note that for some types of the "re" metamodel, the initial call to
eAllContents
works as expected (e.g.ReAbstractElement
,ReNamedElement
, etc.), and for others it produces the error above.Environment