Book a Demo

Author Topic: DDL creation adding default columns  (Read 2434 times)

siochain

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
DDL creation adding default columns
« on: December 12, 2006, 02:14:31 am »
New to EA - from class diagram I have used model transformation to create DDL which creates columns matching attributes of class - ok.
but I also want to add extra columns to every table such as "created_by" etc..
I guess that I need to modify an existing template.
Is there an example of how to do this and where can I get more information on teh syntax of these templates?
thanks

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: DDL creation adding default columns
« Reply #1 on: December 12, 2006, 01:03:12 pm »
Have a look at http://www.sparxsystems.com/EAUserGuide/index.html?mdastyletransforms.htm for the syntax you need to generate and http://www.sparxsystems.com/EAUserGuide/index.html?codetemplatesyntax.htm for the syntax of the templates themselves.

To give you a hint, you'll want to add something like the following to the class template.

Code: [Select]
column
{
 name="created_by"
 type="string"
}

siochain

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: DDL creation adding default columns
« Reply #2 on: December 18, 2006, 06:45:52 am »
Ok - I have done this by cut and pace of each sub element like classs of the DDL template.
Would have been easier if I could copy a template is that possible?
thanks