Book a Demo

Author Topic: Generate DDL Templates?  (Read 3802 times)

mover

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Generate DDL Templates?
« on: May 21, 2008, 02:39:05 am »
I played around some a while ago with modifying the templates for generating source code. I'd now like to make some changes to the way that DDL scripts are created - specifically I want to see if I can extend them so that Sql-Server Extended Properties are also created. I expected to find the templates for generating DDL in with the other "Code Generation Templates" but I don't see them there. I do see DDL listed under "Transformation Templates" but it's my understanding that these are for transforming objects of one type to another within EA, not generating the DDL scripts. Can someone point me in the right direction please?

Thanks!

mover

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Generate DDL Templates?
« Reply #1 on: May 21, 2008, 03:15:19 am »
No such thing I'm afraid. The DDL generation process is closed to us users, poor sad creatures that we are.

This is an often-requested feature, which has not yet seen a positive response.

We live in hope...
No, you can't have it!

mover

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Generate DDL Templates?
« Reply #2 on: May 21, 2008, 04:14:59 am »
Thanks for the quick reply!

To whom it may concern (Sparx Systems) - please consider this another request to expose the templates for generating DDL!

;)

Mover

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Generate DDL Templates?
« Reply #3 on: May 21, 2008, 04:30:30 am »
If you badly need additional functionality in DDL generation, you may want to consider two other options:

1. Write an add in which iterates through the collections in you data model and creates a script,

or

2. export your data model to xmi and write an xsl transformation to create a script. Maybe a data model isn't necessary then at all: you could introduce tagged values on the object model to control direct database script generation.

We are contemplating option 2 at the moment, which comes natural to us in so far as we don't use EA's code generation either, but export a model based on a profile to xmi 2.1. and create code from the xmi file with xsl transformations. Now we want to create databases for our object models as well, and maybe (in the long run) even database access code (mapping from properties to fields and vice versa).

The (Sparxian) recommended way would be to use a customized DDL transformation, but I don't really feel like doing this. This macro language of theirs is awful, and anyway you don't have access to everything within the model. And, as David has pointed out, you have no influence on script generation from the data model. Furthermore using data from xmi export has the great advantage that all the model data are there and you can do what you please, no matter what they decide at Sparx.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Generate DDL Templates?
« Reply #4 on: May 21, 2008, 06:57:44 am »
Quote
Thanks for the quick reply!

To whom it may concern (Sparx Systems) - please consider this another request to expose the templates for generating DDL!

;)

Mover
The best - actually the only 'official' - way to make a feature request is to use the Feature Request link near the bottom of the page. Remember that this is a user forum - though the Sparxians are very active participants - so that postings here are really only discussions. If you make a feature request it will be considered, even if it is not taken up.

David
No, you can't have it!