Ash FrameworkAF
Ash Framework4mo ago
4 replies
alemoreau

Cross schema many_to_many

Hi, I have two resources let's say A and B, A is using :context multitenancy, B is in the public schema.
I want to have a many_to_many relationship between A and B, using a AB resource that also is using :context multitenancy.
The issue is that when I try to load the B records directly from A (MyApp.get_a(a_id, tenant: tenant, load: [:bs]), The query generated tries to join with an AB table from the public schema, which does not exist as it is a multitenant resource. Did I miss something or is it a bug ? Loading through the join resource does work though (MyApp.get_a(a_id, tenant: tenant, load: [abs: [:b]])
Was this page helpful?