Book a Demo

Author Topic: Foreign Key Dialog  (Read 3319 times)

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Foreign Key Dialog
« on: November 10, 2007, 04:33:36 pm »
In the help for 7.0.817 there is a topic Create A Foreign Key which says:
----------------
To create a Foreign Key, follow the steps below:

1. Locate the required Tables in either a diagram or the Project Browser window.  

2. Select an Associate link in the Class Relationships page of the Enterprise Architect UML Toolbox.  

3. Click on the Table to contain the Foreign Key (source) and draw a connector to the other Table (target).  

4. Use the link context menu to display the Foreign Key dialog.
--------------
Apparently, the Foreign Key option on the context menu only appears when the end points are stereotyped as <<table>>.

For an OpenEdge database, I would like to use a stereotype of <<oeTable>> to more accurately model the characteristics of a table in an OpenEdge database.  If I define this stereotype and base it on table, I don't seem to get the Foreign Key option on the context menu when both ends of the association are of type <<oeTable>>.  Any way to get this to work?

I will note that I tried this on a diagram which was created when <<oeTable>> was based on Class, not <<table>> and I have tried doing it all over again from scratch.  Would that make a difference?



Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Foreign Key Dialog
« Reply #1 on: November 10, 2007, 06:58:49 pm »
NO...

Sorry, Thomas, but you too have been caught by the (in my view) incorrect use of stereotypes in EA.

A table is as close to a class as any other non-class classifier - yet it is not granted the status of a fist-class citizen on planet Sparx.  Consequently, even though you may define a stereotype based on the base class table it may not work (as you've discovered).  Just because you can create such a stereotype, doesn't mean EA can apply it...  I was just able to create a stereotype based on the base class: grfrpsprkl.

I tried a whole bunch of permutations to get around this and the least worst was:
 Make the primary stereotype «table» and add any additional stereotype you need.

What EA does with that is:  Place the "table" glyph at the top right hand corner of the shape and display the other stereotypes as though the «table» wasn't on the list.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!