Book a Demo

Author Topic: Transorm from Class to DDL  (Read 2715 times)

Joerch

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Transorm from Class to DDL
« on: June 25, 2009, 05:32:40 pm »
Hello!

I am new to EA.

So far, we I have done the following:

1. create a profile with a stereotype and some tagged values. These tagged values have information like length or SQL-Type. SQL-Type is an enumeration with some SQL Datatypes (NUMERIC, DATE, VARCHAR).

2. I use this UML Profile to set up some classes with the mentioned tagged values. These classes are used to be MY attributes. For example I have created a class Name(tagged values: length=30, SQLType=VARCHAR), Income(tagged values: length=10 scale=2 SQLType=NUMERIC)

3. I have created a new package and a new class Person with the attributes name (datatype=Name) and income(datatype=Income)

4. And now I want to transform this into a DDL.

Where and how can I acces the tagged values of the Datatypes in the transformation process to have a column with the SQLType and the length from the tagged values?

With kind regards

Joerg
« Last Edit: June 26, 2009, 12:35:06 am by joerch »

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Transform from Class to DDL
« Reply #1 on: June 25, 2009, 10:35:38 pm »
By coincidence the same problem applies here, too.

You have a class A which is used as a classfier of attributes of class B with A having tagged values with the implementation type.
Afaik with the transformation language you can access the classifier name but not its tagged values.
The only solution I came up with is to transform the PIM model to a PSM via standard methods and then run a script over it converting the classifier types to the real ones (this is possible with the scripting language). Then you can run the DDL creation process over it.

If I am wrong or if somebody has a better approach I am still interested in it.

Oliver

Joerch

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Transorm vom Class to DDL
« Reply #2 on: June 25, 2009, 11:09:59 pm »
Thank you Oliver!

It is a bit disappointing to here that.

In my case, when I click on the attribute name with the classifier NAME, I can see the tagged values from the classifier NAME. So I thought there could be an easy way to get the tagged values.

I want to avoid attributes with the same meaning but different lenght in the database tables.

Joerg


Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Transorm vom Class to DDL
« Reply #3 on: June 25, 2009, 11:38:55 pm »
Quote
Thank you Oliver!

It is a bit disappointing to here that.

In my case, when I click on the attribute name with the classifier NAME, I can see the tagged values from the classifier NAME. So I thought there could be an easy way to get the tagged values.

I want to avoid attributes with the same meaning but different lenght in the database tables.
 

This is the same motivation I have - avoiding the same datatype being used across the system in various flavors and having a good overview in the PIM model.

I have not given up yet to see a solution coming up from Sparx side or a 3rd party so I stay tuned.

Oliver