Book a Demo

Author Topic: Change names of foreign keys in a class diagram?  (Read 2967 times)

palim

  • EA User
  • **
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Change names of foreign keys in a class diagram?
« on: March 31, 2011, 09:48:28 pm »
Hello,

I used EA to create an ER diagram of some of my columns (in the database). So far, this worked fine.

Unfortunately, I`ve noticed that the foreign keys are displayed with an internal string (I guess) and not the name of the referenced table itself.

Example:
Table A references table B.

After creating the ER diagram with EA, there are the classes A and B, while there is a connector pointing from A to B.
This is fine.

But in Class A, the operation (=the foreign key) is displayed with "SYS_COO51515(Number)" instead of "B(Number)".

Is there any way to get this done with EA?

I think that I could write a short JScript or something that would accomplish this task.
It would be nicer if EA had a function for this  ;)


Best regards,
palim

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Change names of foreign keys in a class diagra
« Reply #1 on: April 01, 2011, 11:27:25 pm »
How did you "create" the diagram in EA?

If you had EA build the diagram via ODBC then the foreign key names are coming from the source data schema. Most DBMS engines have some default mechanism for assigning names to keys. The same may apply to constraints, indexes, etc. depending on the DBMS engine.

For foreign keys that you create within EA, there is a naming mechanism. Go to the Code Editors page of the Tools | Options dialog and click the "..." button after DDL Name Templates. You can now modify the naming conventions.

HTH, David
No, you can't have it!