[ATL] "Copy" reference problem (?) [message #554798] |
Tue, 24 August 2010 08:35  |
Eclipse User |
|
|
|
Sorry, but I don't really understand the problem, which ATL has, and the error message as well. I try to explain:
I've got two different Metamodels: MM0 and MM1. MM0 has a class A und MM1 has a class named B. MM0!A has a directed 0..1-association to MM1!B called linked. The instances of the MMs are in different files as well. So in the file f0.mm0 (for MM0) is a href to the file f0.mm1 (MM1) to the linked element.
The Problem: An easy m2m-transformation with ATL which only "copy" the file f0.mm0 to f1.mm0 doesn't work.
The following code shows the "copy":
module test;
create OUTmm0: MM0 from INmm0 : MM0;
rule A2A {
from s : MM0!A in INmm0
to t : MM0!A in OUTmm0(
linked <- s.linked
)
}
The access to s.linked will thrown the error-message :
org.eclipse.m2m.atl.engine.emfvm.VMException: The value of type 'class org.eclipse.emf.ecore.impl.DynamicEObjectImpl' must be of type 'org.eclipse.emf.ecore.impl.EClassImpl@554d2af5 (name: A) (instanceClassName: null) (abstract: false, interface: false)' ....
I've found a workaround also:
It works if I change multiplicity of the association linked from 0..1 to 0..* in MM0.
But I don't want to change my metamodel. By the way, the transformation with ETL works fine.
Has anybody such a problem and solved it without changing the metamodel?
System: Windows7 (x64) with eclipse Helios Release
Build id: 20100617-1415 and ATL 3.1.0
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05022 seconds