Book a Demo

Author Topic: MDA "DDL" Transformation  (Read 4657 times)

Gary W.

  • EA User
  • **
  • Posts: 139
  • Karma: +0/-0
    • View Profile
MDA "DDL" Transformation
« on: December 10, 2008, 10:10:25 am »
Hello,

We're trying to change the name of the Primary and Foreign Key Constraints (not columns), when doing an MDA "DDL" Transformation.

We've revised the "Connector" template, which seems to control the Foreign Key constraint name.   The default name is "FK_" prefixed to the concatenation of the two tables (e.g. FK_Dept_Emp).  

BUT.. No matter what we do, it seems to ALWAYS create this default naming.   :-/

Does anyone know where to look, to control the foreign key constraint name?

BTW, how about the Primary Key Constraint Name?  We've established that "Connector" template does NOT control this, but neither does the "Class" nor "Class Base" template.

Thanks for any help you can provide,
Gary   :D

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: MDA "DDL" Transformation
« Reply #1 on: December 11, 2008, 08:52:21 am »
The foreign key name comes from the name in the source of the primary key.  But be aware that there are multiple different foreign keys generated in the connector template depending on various conditions.  So make sure you modify the right one.

The primary key comes from the PrimaryKey section in the Class template.  You can add a name there.  To link to it you'll need to change the target name in the foreign key.

Gary W.

  • EA User
  • **
  • Posts: 139
  • Karma: +0/-0
    • View Profile
Re: MDA "DDL" Transformation
« Reply #2 on: December 13, 2008, 10:21:03 am »
Quote
The foreign key name comes from the name in the source of the primary key.
Hmmm, are you sure this is the Foreign Key Constraint Name, not the Foreign Key Column Name?

We tried editing ALL the occurrences of "name=..", but nothing ever changed in the foreign key constraint name.

TIA
Gary

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: MDA "DDL" Transformation
« Reply #3 on: December 15, 2008, 08:15:09 am »
Yes, I'm sure.

The default template doesn't specify a name.  Add a Name="..." inside the foreign key source, but outside the column.

Gary W.

  • EA User
  • **
  • Posts: 139
  • Karma: +0/-0
    • View Profile
Re: MDA "DDL" Transformation
« Reply #4 on: December 17, 2008, 09:57:27 am »
Kewl.. works exactly as you've described.   :D


Thanks..

Gary