Book a Demo

Author Topic: Can't remove pfK tag from column  (Read 6991 times)

Matt Hall

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Can't remove pfK tag from column
« on: July 12, 2008, 01:27:58 am »
Hi

I'm using EA 7.0.818 and I'm working on a database diagram.  I created an association between two tables and assigned a foreign key.  At that point I realised that I had drawn the association in the wrong direction and the "pfK" tag was displayed next to the column information on the wrong table.  At this point I removed the incorrect association and the foreign key from the table.

However at this point the table still shows the text "pfK" next to the column name when it should say "PK".  Even when I re-added the association in the correct direction and the correct foreign key, the "pfK" is still shown.

Short of removing and re-adding the table, is there anything I can do to find where this rogue foreign key is coming from?  I've searched through the column properties and table operations and can't find any mention of it.

Thanks for your help,
Matt

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Can't remove pfK tag from column
« Reply #1 on: July 12, 2008, 01:39:14 am »
Hi Matt,

I've had this happen a few times, and been successful by tinkering a bit. It's been a year though and the details are fuzzy, but here are some suggestions.

How did you remove the prior key? If you just deleted the operation then EA may still 'remember' some of the information.

If you removed the key by deleting the association involved, or better yet by opening the Foreign Keys dialog and removing the keys there, you should be in better shape.

After removing the foreign key, try removing the Primary Key attribute from the field involved. [You can add it in later.] Perhaps even generate the DDL once to make sure EA actually 'reads' the model.

Now recreate the appropriate field attributes by setting primary key attributes and setting up any foreign keys using the procedure in the EA documentation (in case that's not how you did so before).

Did this help at all?

David
No, you can't have it!

Matt Hall

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Can't remove pfK tag from column
« Reply #2 on: July 12, 2008, 01:53:12 am »
Hi David,

Thanks for the quick reply.  I tried this out on a few test tables and I found that whichever method I used to delete the association/operatiopn, the "FK" is still displayed - and this happens for both primary keys and regular columns.  I'm starting to think that this is a weird UI hack that doesn't keep itself properly updated with the real table operations.

I'll try the roundtrip to DDL and see how that works out, maybe that will reset something.  Thanks for the tip.

FYI, I was adding foreign keys by right clicking the association and selecting Foreign Keys, did I do wrong?  I will take a look at the manual.

Matt

Matt Hall

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Can't remove pfK tag from column
« Reply #3 on: July 12, 2008, 02:12:14 am »
The plot thickens.  After exporting to DDL, and then re-importing from ODBC, the primary and foreign keys were all present and correct, however none of the columns had the PK, FK or pfK tags displayed in the diagram.

The seems to confirm that this is a UI bug, as everything under the hood seems to be working correctly.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Can't remove pfK tag from column
« Reply #4 on: July 12, 2008, 07:41:22 am »
I couldn't remember for sure, but it seemed that I had to cycle the model to make things work. Next time try just reloading the diagram (right-click the diagram tab and you should see the option on the context menu). I don't think this is enough, but try it and see.

As far as how you created the keys, you definitely followed the correct procedure.

David
No, you can't have it!