You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi! I use this gem all the time, thanks!
By the way, I have a suggestion, could you please incorporate multi-tenant reference support into this gem?
The reason is that there is a case in which we need to acquire data across tenants, but we are having trouble achieving this with “activerecord-multitenant” at present.
To give a concrete example, we have a case where a group company is using an application and wants to be able to check data across multiple tenants in the group company.
The sample code is as follows.
tenant1,tenant2,tenant3=Tenant.order(:created_at).take(3)pptenant1.id# => "1310041a-c8a8-4d35-b395-8386af95a24f"pptenant2.id# => "bb257a59-9811-473b-87a7-64c11f8799ab"pptenant3.id# => "eff47159-53af-4b35-ba39-13e6fac0d5fa"# Multiple `tenant1.id, tenant2.id, tenant3.id` queries are addedMultiTenant.with_read_multiple([tenant1.id,tenant2.id,tenant3.id])doputsUser.all.to_sql# => SELECT "users".*# FROM "users"# WHERE "users"."tenant_id" IN ('1310041a-c8a8-4d35-b395-8386af95a24f', 'bb257a59-9811-473b-87a7-64c11f8799ab', 'eff47159-53af-4b35-ba39-13e6fac0d5fa')end
At this point, reading alone is sufficient, so we are not considering support up to writing
I'll make a PR if there is interest or acceptance of this proposal!
The text was updated successfully, but these errors were encountered:
hi! I use this gem all the time, thanks!
By the way, I have a suggestion, could you please incorporate multi-tenant reference support into this gem?
The reason is that there is a case in which we need to acquire data across tenants, but we are having trouble achieving this with “activerecord-multitenant” at present.
To give a concrete example, we have a case where a group company is using an application and wants to be able to check data across multiple tenants in the group company.
The sample code is as follows.
At this point, reading alone is sufficient, so we are not considering support up to writing
I'll make a PR if there is interest or acceptance of this proposal!
The text was updated successfully, but these errors were encountered: