Open CBroz1 opened 1 month ago
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
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 costly