defineTable parent node
I want the document to be inherited by descendants of the same type. Or is this not possible?
I don’t even want to make it as separate tables and not nested structures
if there are children in each node and searching for them by ID, it is expensive, so it needs to be able to skillfully have 1 document and its children
3 Replies
Either do it this way, but it’s not pretty
Convex schema doesn't support recursive types right now.
You can use
v.any() as Validator<RecursiveType>
and do the validation manually in JS.Well, in general, I replaced it with an iterative array of parent, I will search by name and build a structure tree