Book a Demo

Author Topic: Generate DDL for Foreign Key?  (Read 3431 times)

paky

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Generate DDL for Foreign Key?
« on: July 02, 2002, 08:12:15 am »
I've using EA 3.10 (487) and i'm tring to generate ddl from a data model, but i've the following problem: the foreign key is not exported into database script, is it possible with EA? In documentation, it has been written that it's ok. Why?
I've expressed this foreign key as an operation of a table, as it suggested in documentation. Is it ok? Then is it possible to export the relationships between tables by DDL tool generate?
???
Thank you very much for your attention !

Didier Willam

  • Guest
Re: Generate DDL for Foreign Key?
« Reply #1 on: July 03, 2002, 12:07:13 am »
 ??? I have exactly the same problem even If I use EA differently:

I did a reverse engineering of a DataModel (Sql Server7) and
EA is unable to regenerate correctly the DDL for the foreign key.

Also he does not recognize the indexes in the original DB.

I will post this problem to the ea-support.

ronnie

  • EA User
  • **
  • Posts: 81
  • Karma: +0/-0
    • View Profile
Re: Generate DDL for Foreign Key?
« Reply #2 on: July 03, 2002, 12:59:53 am »
I've got Foreign keys working, but apparently indices aren't supported yet.

To make a foreign key work you have to create an operation in each of the tables (one is done for you when you specify PK - the other you can make just by adding a FK stereotyped operation - make sure after creating the FK operation you re-select it in the list and switch tab to 'fields' and add the appropriate fields to the operation - this is V-Important!).

Then on your association between the classes it's necessary to specify the operations in the source-role and target-role dialogues. This requires that you have the direction of the assocation the right way round - otherwise the wrong operations appear in the wrong drop-down lists.

Hope this helps
Ronnie
Ronnie