Hey all - quick question about SpiceDB
# spicedb
j
Hey all - quick question about SpiceDB schemas. Given this folder schema:
Copy code
zed
definition user {}
definition folder {
   relation parent: folder
   relation member: user
   permission view = member + parent->member
}
A folder's
parent
relation could technically have multiple folders written to it. Is there a way to enforce single-parent (no multiple ancestors) at the schema level, or does that constraint have to live in application logic?
y
right now it has to live in application logic
we're bouncing around a proposal internally that would let you specify that invariant in the schema and then have it be enforced by SpiceDB, but it's not currently on the roadmap
5 Views