Book a Demo

Author Topic: Transforming datatype from PIM to PSM  (Read 5328 times)

mrr

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Transforming datatype from PIM to PSM
« on: February 05, 2011, 12:30:06 am »
Enterprise Architect allows one to define datatypes on the conceptual/logical model (Example - class Money with attribute currency code having type CurrencyCode).
The class is defined in the logical/conceptual level(Platform Independent Model). When transforming the class to a PSM, I would like to generate the underlying tables for Oracle. The class should generate a table Money with one column, currency code having the type varchar2(3). I can run simple transformations with pre-defined common types but I am struggling to define my own types.
Specifically, I am not able to define two diferent conceptual datatype mapping to the same Oracle datatype (example: CurrencyCode maps to varchar2(3) and Descriptive maps to varchar2(255)).
Comments are welcomed !

Thomas_Arnbjerg

  • EA User
  • **
  • Posts: 80
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Transforming datatype from PIM to PSM
« Reply #1 on: February 21, 2011, 10:16:36 pm »
Have you created your own transformation or are you using a built-in transformation (which)?

Joerch

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Transforming datatype from PIM to PSM
« Reply #2 on: March 08, 2011, 06:55:10 pm »
I'm having the same problem.

I would like define some data types, like email or name which are both strings, but have a differnet length and are VARCHARS ind DDL.

So what I'm missing is an mapping from datatypes to DB sql-types.

Any idea?

With kind regards

Joerg Fechner

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Transforming datatype from PIM to PSM
« Reply #3 on: March 08, 2011, 07:20:30 pm »
Joerch,

I believe the mapping is done in the transformation template.

Geert

mrr

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Transforming datatype from PIM to PSM
« Reply #4 on: March 10, 2011, 03:21:38 am »
I am using the option "Generate DDL..." from the menu, which ultimately makes usage of the "Settings->Database Datatypes" mapping. I still have not found a solution.
« Last Edit: March 10, 2011, 03:22:04 am by romaniuc »

Joerch

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Transforming datatype from PIM to PSM
« Reply #5 on: March 10, 2011, 03:22:54 am »
Hello Geert,

hmm I have not found a mapping ind the transformation template.

What I have found ist this:

Code: [Select]
type=%qt%%CONVERT_TYPE(genOptDefaultDatabase,attType)%%qt%
For example: When you have the language JAVA, you have no type String in the "Programming Language Type". You add an attribute in the Class with type String and when you transform it to DLL it is VARCHAR(50). It is defined in the "Database Datatypes". But nothing with String. So, I can not see a mapping.

Kind regards

Joerg

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.