[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [QVTO]when a type does not conform to itself?

Hi, Radek,

I'm afraid this is not the problem, since all types are fully qualified. Also, source mm is UML (no MySpecialConnector ;-). In any case, I reproduce the whole mapping below. In this case, all attributes defined in the subclass (Temp::ParameterableComponent) work fine, while ownedConnectors, and any other attribute inherited from the superclass fail. If you have time to check this problem, I can send you the metamodels.

Thank you again,

CÃsar

mapping UML::Class::toParameterableComponent():Temp::ParameterableComponent
when{ not self.ownedTemplateSignature.oclIsUndefined() }
{
init{
log(self.name);
result:=self.resolveone(Temp::ParameterableComponent);
}
name:=self.name;
formal:=self.ownedTemplateSignature.ownedParameter->map toFormalParameter()->asOrderedSet();
innerElement:=self.ownedAttribute->map toParamProperty()->asOrderedSet();
innerElement+=self.ownedConnector->map toParamConnector()->asOrderedSet();
--ownedConnectors:=self.ownedConnector->map toAssemblyConnector();
}


"Radek Dvorak" <radek.dvorak@xxxxxxxxxxx> a Ãcrit dans le message de news:op.t9zdahyihj1a1g@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi CÃsar,

Just a hint that first came to my mind, in case you use unqualified type names and
both the source and target metamodel contain 'MySpecialConnector' type.
Could you check this case?
The type name can be qualified with the package name or even modeltype name to resolve
ambiguities.


PS: However, if it's this case, we have to report ambiguos type reference.

Regards,
/Radek


On Mon, 21 Apr 2008 23:16:38 +0200, kaiserlautern <comouraf-lixo@xxxxxxxx> wrote:


Hi,

I'm getting the following error:

"The type 'collections::Bag(MySpecialConnector)' does not conform to the type 'Bag(MySpecialConnector)' of the property 'ownedConnectors'"

originating in the line:

 > ownedConnectors:=self.ownedConnector->map toMySpecialConnector();

where 'ownedConnectors' is an attribute from a superclass defined in another metamodel (visible via code completion). The same assignement works when called in the superclass.

Any idea on what is happening here?

Thanks,

CÃsar



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/