[v4.5.0][Bug] mm file compile to java with classes using opposite of
electricalwind opened this issue · 4 comments
when a mm file with classes containing field with oppositeOf is compiled to java
issued metaclasses (in the meta folder) and more precisely MetaAttribute corresponding to the fields containing oppositeOf aren't valid.
e.g:
for this class:
class bugveul.Version {
idVers : String
bugs : bugveul.Bug[0,*] oppositeOf vers
}
it generates:
public static final org.kevoree.modeling.api.meta.MetaReference REF_BUGS = new org.kevoree.modeling.api.abs.AbstractMetaReference("bugs", ..., new org.kevoree.modeling.api.abs.LazyResolver() {@Override public org.kevoree.modeling.api.meta.Meta meta() {return bugveul.meta.MetaVersion.REF_VERS;}})
instead of:
public static final org.kevoree.modeling.api.meta.MetaReference REF_BUGS = new org.kevoree.modeling.api.abs.AbstractMetaReference("bugs", ..., new org.kevoree.modeling.api.abs.LazyResolver() {@Override public org.kevoree.modeling.api.meta.Meta meta() {return bugveul.meta.MetaBug.REF_VERS;}})
OK looks like a simple copy paste error. Will be fixed for next release.
Le 26 déc. 2014 17:20, "Jimenez Matthieu" notifications@github.com a
écrit :
when a mm file with classes containing field with oppositeOf is compiled
to java
issued metaclasses (in the meta folder) and more precisely
MetaAttribute corresponding to the fields containing oppositeOf aren't
valid.
e.g:
for this class:class bugveul.Version {
idVers : String
bugs : bugveul.Bug[0,*] oppositeOf vers
}it generates:
public static final org.kevoree.modeling.api.meta.MetaReference REF_BUGS = new org.kevoree.modeling.api.abs.AbstractMetaReference("bugs", ..., new org.kevoree.modeling.api.abs.LazyResolver() {@OverRide public org.kevoree.modeling.api.meta.Meta meta() {return bugveul.meta.MetaVersion.REF_VERS;}})
instead of:
public static final org.kevoree.modeling.api.meta.MetaReference REF_BUGS = new org.kevoree.modeling.api.abs.AbstractMetaReference("bugs", ..., new org.kevoree.modeling.api.abs.LazyResolver() {@OverRide public org.kevoree.modeling.api.meta.Meta meta() {return bugveul.meta.MetaBug.REF_VERS;}})
However everything work fine when firstly converting the mm file to ecore
then compiling to java this ecore file—
Reply to this email directly or view it on GitHub
#67.
Hello, first of all thank you for your reporting. Can you copy past the .mm code in the issue tracker then i can reproduce and test
No problem, I sent it to you by mail.
Received ! :-) Fixed in 4.5.1 thx again for the bug report