Book a Demo

Author Topic: Sequence on ddl generation  (Read 4394 times)

Jean-Francois Palasse

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Sequence on ddl generation
« on: May 01, 2008, 03:50:27 am »
Hello,

When generating DDL, is it possible to force the generation of views after all the generation of triggers on a table?

The problem I meet, is that I use trigger to create a calculated column. The column does not exist initialy. In the behavior of the trigger I put the code to create the new calculated column. But I also have a view that depend on that column. The generated DDL create the view before creating the triggers of tables (in my case before the calculated column exist).

We use SQL Server 2005. The version of EA is 7.1 build 827.

Thanks

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Sequence on ddl generation
« Reply #1 on: May 01, 2008, 07:09:06 am »
That sounds like a DDL trigger rather than a DML trigger. I don't think you can define these in EA - at least not the way you want to.

[I could be wrong here, but just in case I'm right...]

There's no reason you cannot do this another way though. Create the DDL triggers as a separate set of EA entities, either in the same EA diagram or a different one (probably) in the same package. Then generate only those triggers as one script. Generate the rest of your model as another script.

Now join the scripts. Either use a text editor, or model a procedure to do it for you.

Not perfect I know, but it might get you moving.

David
No, you can't have it!