Book a Demo

Author Topic: Creating a foreign key  (Read 11593 times)

martinf

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Creating a foreign key
« on: December 14, 2009, 08:22:59 pm »
Hello there,

Im trying to create a foreign key to my table. I have 2 tables.Both of them have a primary keys and the second one also a field for the foreign key. Fields are of type NUMBER(9). Its for an oracle database. Then I've created an Association from one table to other. Afterwards I've clicked rightclick on the association to open the Foreign Key settings. I choose the field for the FK and the Save button is inactive. When I've changed the Cardinality setings, suddenly the Save buton is active, however when i click the save button no foreign key is created.

What do I  wrong ?

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • ArenĀ“t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Creating a foreign key
« Reply #1 on: December 15, 2009, 03:38:34 am »
The FK dialog is rather picky if it finds that eg. both tables belong to different databases or the datatypes are not suitable for the database set up. Or if the datatypes of the source and target columns (primary keys)  do not match.

I fell into that pit several times.

Oliver