Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple FOREIGN KEY #665

Open
matiasmorant opened this issue Jan 12, 2022 · 1 comment · May be fixed by #762
Open

Support multiple FOREIGN KEY #665

matiasmorant opened this issue Jan 12, 2022 · 1 comment · May be fixed by #762

Comments

@matiasmorant
Copy link

column employee.department refers to department.id and
column employee.boss refers to bosses.id

so table employee has 2 FOREIGN keys:

CREATE TABLE employee (
    id TEXT,
    department TEXT,
    boss TEXT,
    FOREIGN KEY(department) REFERENCES department(id) ON UPDATE RESTRICT ON DELETE CASCADE,
    FOREIGN KEY(boss) REFERENCES boss(id) ON UPDATE RESTRICT ON DELETE CASCADE
)

but only 1 FOREIGN KEY is supported, and I'm hitting

raise AttributeError("'Query' object already has attribute foreign_key")

@alisoufali
Copy link

I've encountered same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants