Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Set default created date on target...
Set default created date on target... [message #549118] Sat, 24 July 2010 19:23 Go to next message
Izaak van Niekerk is currently offline Izaak van NiekerkFriend
Messages: 35
Registered: June 2010
Member
I need to create a new instance of an object in a target model with a created date set to the current date and time, how can I do this with the ATL language?

for example, how would I be able to get the current dateTime?

rule Type2Type {

from
s : ModelV1!Type
to
t : ModelV2!Type (
createdDate <- getNow() -- ??
)

Re: Set default created date on target... [message #549225 is a reply to message #549118] Mon, 26 July 2010 07:59 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
Add an eOperation on the Type EClass in your meta-model. Generate with EMF, fill the method body and then you'll be able to call it in the ATL transformation.
Previous Topic:SOLVED: [ATL] How to transform only one element of the same id
Next Topic:[ATL] global elements in xmi file
Goto Forum:
  


Current Time: Wed Dec 04 09:43:13 GMT 2024

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

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

Back to the top