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 multi-table delete #98

Open
ScopeyNZ opened this issue May 6, 2019 · 1 comment
Open

Support multi-table delete #98

ScopeyNZ opened this issue May 6, 2019 · 1 comment

Comments

@ScopeyNZ
Copy link
Contributor

ScopeyNZ commented May 6, 2019

Currently if you try to archive any object that is versioned you will get a fatal error using PostgreSQL - it doesn't support the multi table delete syntax built using DBQueryBuilder. This can be relatively easily addressed by overloading buildDeleteQuery in PostgreSQLQueryBuilder - the syntax can be changed to use sub-select conditions or CTEs.

Perhaps this issue would be better placed in framework as you might argue that the ORM should generate more SQL engine agnostic queries.

I was in two minds about whether this was type/bug or type/enhancement - It's pretty broken right now but there's a comment in the ORM code saying:

Note that some schemas don't support multiple table deletion

@tractorcow
Copy link
Contributor

tractorcow commented May 7, 2019

Multi table delete is technically allowed in SQLDeleteExpression, but it fails on lots of database connectors.

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

No branches or pull requests

3 participants