Trivadis / sqldev-jdbc-proxy

JDBC driver for SQL Developer that can delegate MySQL requests to Snowflake, PostgreSQL, SQLite, H2 and MySQL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Foreign Keys not shown in model tab

PhilippSalvisberg opened this issue · comments

These tables

CREATE TABLE dept (
   deptno   NUMERIC(2,0)  CONSTRAINT pk_dept PRIMARY KEY,
   dname    VARCHAR2(14)  NOT NULL,
   loc      VARCHAR2(13)  NOT NULL 
);

CREATE TABLE emp (
   empno    NUMERIC(4,0)   CONSTRAINT pk_emp PRIMARY KEY,
   ename    VARCHAR(10)    NOT NULL,
   job      VARCHAR(9)     NOT NULL,
   mgr      NUMERIC(4,0),
   hiredate DATE           NOT NULL,
   sal      NUMERIC(7,2)   NOT NULL,
   comm     NUMERIC(7,2),
   deptno   NUMERIC(2,0)   NOT NULL CONSTRAINT fk_deptno REFERENCES dept,
   CONSTRAINT fk_mgr FOREIGN KEY (mgr) REFERENCES emp
);

are shown in the model tab of SQL Developer for dept as follows:

image

Interesting is that both tables are shown, but no foreign key relationships.

This is not a bug of the JDBC proxy driver. It's a SQLite driver bug. The workaround is therefore considered an enhancement.