c
Hi! I read in a previous thread that there is no notion/concept of cascading deletes of relationships, is this still the case and if so what is the best way to deal with this? Thanks!
y
that's still the case. what's the use case you're dealing with?
c
I just have a bunch of nested object type definitions and want the nested relationships to be deleted when i delete the root of the nested definitions. consider a nesting structure like - X - Y - Z If i delete X i would want the X to Y and the Z to Y relationship to be deleted as well. Right now i just went ahead and created a util called
deleteXRelationsCascading
that finds all relationships and deletes them
y
hmm
there is a syntax change that we were considering that would be somewhat related
lemme see if i can dig up any documentation of that
ah, it's an internal doc, but we're talking about a way to extend the schema syntax to mark that one definition is a "parent" of another, which would indicate that the same object can't have two distinct subjects (among other concerns)
it'd help ensure that (say) a file couldn't be included in multiple folders, or that a team couldn't be attached to multiple organizations, and the associated authz concerns that would come with that
and we talked about how it could also enable this sort of cascading delete behavior
we're tracking the issue on the public repo here https://github.com/authzed/spicedb/issues/204 if you want to provide some input
though i will say that one of the weirdnesses here is that SpiceDB doesn't hold nodes, only edges, so the question of whether a resource exists is kind of a weird one
2 Views