I donβt think there is any clear winner, especially if you think that not all requests should be filtered by account. Also consider the old trick threadlocalsconsidered unreliable, which means that the only way to automatically insert filter parameters would be with middleware, I think ... but it also seems unreliable and complicated for me.
I also did not have a good way to make a query manager that can help here, but it is possible.
, , "multi-tenant" , . :
, , , .