Given two tables `notes` and `tags`, and a join ta...
# help
s
Given two tables
notes
and
tags
, and a join table
note_tags
, if I wanted to create a
tag
and a relationship to a
note
in a single transaction, what's the best approach, if possible?
g
Assuming you are talking from supabase.js , you need to use an rpc function for multiple insert or updates. The inserts in the function are run as a transaction, so all must succeed. Other option is to do separate inserts in js and handle errors.
s
Got it thanks.