Is there an "insert" version of prepare_query?

I’ve gone through the Ecto docs and have been unable to find anything but thought I’d check here to see if I’m missing something.

Per the Ecto docs, I’ve been using prepare_query to scope queries to the current tenant, which is stored in the process dictionary.

Is there any equivalent callback so that every time I insert a record, the org_id is automatically set to the org_id in the process dictionary?

Thanks in advance for any guidance.

1 Like