| Multiple to One model Transformation In QVTO [message #1235028]
||Thu, 23 January 2014 11:34
| Ben Haldo
Registered: October 2013
I have posted this in another Eclipse forum, I'm posting it here because I couldn't get an answer.|
I am trying to learn model transformation using QVTO. I have two simple source models (VehicleMM , DriverMM )each with a single class and a single attribute. My target metamodel (CarMM )has also one class but has two attributes. I want to transform the attributes of the source models to the attributes of target model. Putting it simply, I want to do a multiple models to a single model transformation in QVTO.
So far I managed to write a transformation like this:
transformation VehitoCar(in vehiSource:VehicleMM, out carTarget:CarMM);
vehiSource.rootObjects()[Vehicle] . map vehi2Car( ????? );
brand := self.brand;
driver := driverInst.drivName;
I couldn't figure how to instantiate the Driver model to pass it to the vehi2Car mapping. I mean what kind of construct should be placed in place of ????? Any ideas on how to achieve this? Or Is there another way to solve this problem?
[Updated on: Thu, 23 January 2014 11:48]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02008 seconds