我有三个表:organization,organization_teams和org_users.这organization_teams是继承自organization.因此,假设如果在organizations_teams其中添加记录将使organization表格id成为id列中的值organization_teams.
org_users在id列上有外键organization.现在,当我尝试在其中插入数据时org_users,给出了如下错误
insert or update on table "org_users" violates foreign key constraint "org_users_organizations"
DETAIL: Key (org_id)=(12) is not present in table "organizations"
Run Code Online (Sandbox Code Playgroud)
为什么?