Ask Your Question
0

How to display sql-made foreign keys in relationships editor?

asked 2017-11-27 13:31:46 +0200

hgms gravatar image

When I create foreign keys by sql, they don't show in the relationships editor window. What makes which constraints are graphically shown and which are not? Do I have to give my sql-made constraints a specific name (like FK_SYS_)?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-11-27 17:21:14 +0200

Ratslinger gravatar image

updated 2017-11-27 18:51:08 +0200

Hello,

There are no requirements for constraint naming. If the key is set correctly it should appear. List your key(s) with the following SQL to insure they are actually present:

HSQLDB v1.8 (default embedded):

SELECT * FROM INFORMATION_SCHEMA.SYSTEM_TABLE_CONSTRAINTS

HSQLDB v2.x (split):

SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS

Edit:

You have not specified the DB (or connector type if appropriate) you are referring to. While the above is true in most cases, there are some situations (SqLite comes to mind) where display may be a problem.

edit flag offensive delete link more

Comments

Connected to a MySQL (=MariaDB v 10.0.31 SLE12 sp2 ) over JDBC (MariaDB connector) : Relations, created with SQL, show up

komma4 gravatar imagekomma4 ( 2017-11-27 19:17:14 +0200 )edit

MySQL Native also show.

Ratslinger gravatar imageRatslinger ( 2017-11-27 19:22:09 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-11-27 13:31:46 +0200

Seen: 52 times

Last updated: Nov 27 '17