Book a Demo

Author Topic: Problem renaming column in foreign key  (Read 2689 times)

Rollie

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
Problem renaming column in foreign key
« on: November 22, 2004, 09:11:38 am »
Has anyone ran into a problem renaming a column used in a foreign key.  When I tried to rename the columns it corrupted the foreign key?  Here are some step by step details:

1.      Create table named TableA.
2.      Add column named primary_key, type LONG, Primary Key.

3.      Create table named TableB.
4.      Add column named ta_primary_key, type LONG.

5.      Associate TableB to TableA.
6.      Select the Foreign Keys option using right mouse click on the association.
7.      Select ta_primary_key in left list and primary_key in right list and then click on the save button.

8.      Now, TableB appears to be related to TableA through the “ta_primary_key=primary_key” association.

9.      Select primary_key from TableA and change its name to primary_sequence, then click on the save button.
10.      Click yes to propagate the name change to connected tables.

11.      Now, TableB appears to be related to TableA through the association of ta_primary_key = primary_sequence.

12.      Now select the column for ta_primary_key in TableB and change its name to ta_primary_sequence and click the save button.
13.      Click yes to propagate the name change to connected tables.

14.      Now, TableB still appears to be related to TableA through the “ta_primary_key = primary_sequence” association and not a “ta_primary_sequence=primary_sequence” association.

15.      If I go to the foreign dialog box and remove the incorrect association referencing a key that no longer exists, I can then add the correct association.


Note: It appears that if I perform the rename on the column in TableB first, then rename the column in TableA, the foreign key is updated correctly.  Am I doing something wrong, or is this a problem?

Thanks

hd

  • EA Administrator
  • EA User
  • *****
  • Posts: 312
  • Karma: +0/-0
    • View Profile
Re: Problem renaming column in foreign key
« Reply #1 on: November 22, 2004, 06:48:51 pm »
This is a bug  :( and there will be a fix in build 741.
Thanks for pointing that out.