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

Using __table_args__ to specify an interleaved child ignores cascade action #98

Closed
geudrik opened this issue Jul 18, 2021 · 3 comments · Fixed by #99
Closed

Using __table_args__ to specify an interleaved child ignores cascade action #98

geudrik opened this issue Jul 18, 2021 · 3 comments · Fixed by #99
Assignees

Comments

@geudrik
Copy link

geudrik commented Jul 18, 2021

Expected Behavior

INTERLEAVE IN PARENT ob_malware ON DELETE CASCADE;

Actual Behavior

INTERLEAVE IN PARENT ob_malware ON DELETE NO ACTION;

Steps to Reproduce the Problem

Create a table using a declarative base, and specify

__table_args__ = {
        "spanner_interleave_in": "ob_malware",
        "spanner_interleave_on_delete_cascade": True
    }

The table is configured correctly to be interleaved, but cascade is set to NO ACTION

Specifications

@larkee
Copy link
Contributor

larkee commented Jul 19, 2021

Thank you for filing this issue!

I was able to replicate the problem and discovered that the implementation was not checking the passed bool due to a typo in the keyword 😅

I have created a fix PR here: #99

@geudrik
Copy link
Author

geudrik commented Jul 19, 2021

Thanks for a quick fix! 😀

@geudrik
Copy link
Author

geudrik commented Jul 22, 2021

Any idea when this will make it onto pypi? We're ready to start building with it

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