resulting in
ERROR: missing FROM-clause entry for table "entity"
Here's my table definitions...
CREATE TABLE IF NOT EXISTS account (
id bigserial NOT NULL,
email varchar(50) NOT NULL,
password varchar(256) NULL,
CONSTRAINT account_pk PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS entity (
id bigserial NOT NULL,
name varchar(50) NOT NULL,
CONSTRAINT entity_pk PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS permissions (
account_id bigint NOT NULL REFERENCES account (id),
entity_id bigint NOT NULL REFERENCES entity (id),
CONSTRAINT permissions_pk PRIMARY KEY (account_id,entity_id)
);
I have the following definitions:
When I try to select data using my join, it fails
resulting in
ERROR: missing FROM-clause entry for table "entity"
Here's my table definitions...
Am I doing something wrong?