Hacker News new | ask | show | jobs
by nickjj 1912 days ago
I'd be curious how this compares to Ecto.Repo.prepare_query/3 at https://hexdocs.pm/ecto/multi-tenancy-with-foreign-keys.html... which sets you up for foreign key based multi-tenancy that can be enforced automatically in most common cases.

Is your strategy meant to be an alternative to prepare_query?

1 comments

Not an alternative, but as a companion to it. In our use-case we use a custom `OrgRepo` wrapper around `Repo` which handles a lot more read/write scenarios.