Skip to main content



      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 15:23 Go to next message
Eclipse UserFriend
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 03:59 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 04:17:03 EDT 2025

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

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

Back to the top