melange
melange copied to clipboard
[ModelCopier] EOpposite references with -1 upperbound on both sides are never copied
I tried to run a model with a "lang" query to automatically convert the model to an executable version (ie. "downcast"), and I realized some references were always null in the converted model.
After debugging, this seems to be linked to this line, where the references are not copied in the case a reference is eopposite, or if both opposite references have -1 upper bound (which is my case): https://github.com/diverse-project/melange/blob/master/plugins/fr.inria.diverse.melange.resource/src/main/java/fr/inria/diverse/melange/resource/loader/ModelCopier.xtend#L128
I think a single new case should be added for -1/-1 opposites, while currently only 1/-1 are managed correctly.