I have 2 tables joined with an associative table in PostgreSQL 9.5.3, front end Librebase with a join as follows (pk woid--> fk woid fk UNIQUE_ID--> pk UNIQUE_ID (woid varchar, UNIQUE_ID BigInt(8)). How this works in HSQL is from an entry in the wotbl(pk woid) I can associate 2 or three entries from the civictbl (pk UNIQUE_ID) through my jtbl_cwo(pk((fk woid)(fk UNIQUE_ID))). The jtbl_cwo takes the pk from each entry. However when I do this in PostgreSQL I get the error;
"pq_Driver:[PGRES_FATAL_ERROR]ERROR: insert or update on table
"jtbl_cwo" violates foreign key constraint "UNIQUE_ID_fkey" DETAIL:
Key(UNIQUE_ID)=(0) is not present in table "civictbl". (caused by
statment 'INSERT INTO "wotracking"."jtbl_cwo" ("UNIQUE_ID","woid")
VALUES ('0','BB306-16')')
It looks to me that the jtbl_cwo is taking the woid but not the UNIQUE_ID from the civictbl. Any ideas on how to resolve this error?