kstulgysK
Convex Community2y ago
6 replies
kstulgys

how do I create one-to-one edge relation?

  tags: defineEnt({
    name: v.string(),
  }).edge("post"),

  posts: defineEnt({
    title: v.string(),
    body: v.string(),
  }).edge("tag"),


One post has one tag and one tag has one post.
How do I create these records at the same time? Because one needs to exist before the other.
Was this page helpful?