-
Notifications
You must be signed in to change notification settings - Fork 45
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
SpyglassMixinPart
rejects restrictions of self on delete
#1163
Comments
Are there downsides to making the last three cases work? |
Depending on the implementation, computation time or consistency/violating expectations. Currently, relatively few of the part tables in the package inherit this class. Arguably, they all should |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
SpyglassMixinPart.delete
was designed to allow propagation of deletes through parts with fk refs, but, in doing so, removes the ability to restrict the part itself by a secondary key.We could decide that this is working as intended - one should not target the part itself for delete. Or, we can say this is counter intuitive and adjust the delete to accept either restriction of part or master
Example tables
Example usage
Should all of these work?
Solutions
self.master >> restriction
) while also opening the door to any deletes downstream and maybe being more overhead than we'd liketry/except
restriction of the part or direct cascade of the restriction to the master would be less costlyThe text was updated successfully, but these errors were encountered: