Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
nickjj
· 5y ago · 0 comments
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?
Comments
[–]
sheharyarn
5y ago
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.