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
with these association, in MultiTenant.without scope, I got following result
[5] pry(main)> Hoge.first.fuga
Fuga Load (2.8ms) SELECT "fugas".* FROM "fugas" WHERE "fugas"."tenant_id" = 1 AND "fugas"."id" = $1 LIMIT $2 [["id", 10605], ["LIMIT", 1]]
=> nil
expected result i guess
[5] pry(main)> Hoge.first.fuga
SELECT "fugas".* FROM "fugas" WHERE "fugas"."id" = $1 LIMIT $2 [["id", 101], ["LIMIT", 1]
I would like to filter fugas without tenant_id clause.
In Rails6.1.7 and activerecord-multi-tenant(1.2.0), I can get expected result
How can I solve this problem?
The text was updated successfully, but these errors were encountered:
morieeeenyo
changed the title
Auto Insert tenant_id filtering in asociation
Auto Insert tenant_id Problem when filtering with ActiveRecord asociation
Jan 22, 2025
I have activerecord-multi-tenant with following code in Gemfile.
so that I have to use it with Rails7.2
but in this version activerecord relation like following does not work propery.
with these association, in MultiTenant.without scope, I got following result
expected result i guess
I would like to filter fugas without tenant_id clause.
In Rails6.1.7 and activerecord-multi-tenant(1.2.0), I can get expected result
How can I solve this problem?
The text was updated successfully, but these errors were encountered: