Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Transforming to and from nested objects
Transforming to and from nested objects [message #753380] Wed, 26 October 2011 23:29 Go to next message
Yasser Khan is currently offline Yasser KhanFriend
Messages: 23
Registered: October 2011
Junior Member
My input metamodel is the following

<A>
<B />
<B />
<B />
</A>

My output metamodel is the following

<X>
<Y />
<Y />
<Y />
</X>

My output model turns out to be like this

<X />
<Y/ >
<Y/ >
<Y/ >

I want it to be like this

<X>
<Y/>
<Y/>
<Y/>
</X>

Please advise.
Here is my transformation code

rule A2X {
from
a: MM1!A
to
x: MM2!Dead
name <- a.name,
y < a.b
)
}

rule B2Y
{
from
b: MM1!B
to
y: MM2!Y
(
name<- b.name
)
}


Re: Transforming to and from nested objects [message #754092 is a reply to message #753380] Mon, 31 October 2011 17:47 Go to previous message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 62
Registered: July 2009
Member
Hi Ybakhan,

This transformation should work. Please make sure that you are using a
*containment* feature.

Best wishes,
--
Tatiana Fesenko
ModelSolv, Inc.
Model-Oriented Solutions for Service Integration
Previous Topic:[QVTr] Is it impossible to create a profileApplication in QVT Relation Language?
Next Topic:[ATL] recover the value of a "multivalued" property in a stereotype
Goto Forum:
  


Current Time: Sat Apr 20 08:33:46 GMT 2024

Powered by FUDForum. Page generated in 0.03188 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top