Hi all,
Hi all,
QQ - if i have a many to many relationship, does convex have any native mechanism to avoid duplication when inserting? Or do I simply need to check that inside my mutation for the assoc tables?
3 Replies
Typescript is the native mechanism 😛
But srsly yeah, just check in the mutation. You can also use
.unique()
when querying - that doesn't enforce unique writes but at least throws errors on read.yeah not a biggie, just wondered 🙂 its a simple check after all 🙂
but rather not do my own logic if there would be an OOB one avail
Yeah I understand that. Everyone checks for one lol.
(I definitely did)