Problem (error) with composite foreign key
- Dominant language
- Java
- Stars
- 51.8k
- Forks
- 4.4k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 188
Description
**System information:**
_- Operating system (distribution) and version:_ **Microsoft Windows [Version 10.0.19043.1526]**
_- DBeaver version:_ **Version 21.3.4.202202051448**
_- Additional extensions:_ **No extensions**
**Connection specification:**
_- Database name and version:_ **SQLite [3.36.0]**
_- Driver name:_ **SQLite [3.36.0]**
_- Do you use tunnels or proxies (SSH, SOCKS, etc)?:_ **No**
**Describe the problem you're observing:**
1) SQL ( Sqlite3 file: [temp.zip](https://github.com/dbeaver/dbeaver/files/8060238/temp.zip) ):
```sql
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;
-- Table: test_123_FK
DROP TABLE IF EXISTS test_123_FK;
CREATE TABLE test_123_FK (id_1_FK INTEGER NOT NULL UNIQUE, id_2_FK INTEGER NOT NULL UNIQUE, id_3_FK INTEGER UNIQUE NOT NULL, FOREIGN KEY (id_1_FK, id_2_FK) REFERENCES test_12_PK (id_1_PK, id_2_PK), FOREIGN KEY (id_2_FK, id_3_FK) REFERENCES test_23_PK (id_2_PK, id_3_PK));
-- Table: test_12_PK
DROP TABLE IF EXISTS test_12_PK;
CREATE TABLE test_12_PK (id_1_PK INTEGER NOT NULL UNIQUE, id_2_PK INTEGER NOT NULL UNIQUE, PRIMARY KEY (id_1_PK, id_2_PK));
-- Table: test_23_PK
DROP TABLE IF EXISTS test_23_PK;
CREATE TABLE test_23_PK (id_2_PK INTEGER NOT NULL UNIQUE, id_3_PK INTEGER NOT NULL UNIQUE, PRIMARY KEY (id_2_PK, id_3_PK));
COMMIT TRANSACTION;
PRAGMA foreign_keys = on;
```
**Problem:**

**Correct**

Contributor guide
Assessment
This issue has not been assessed yet.