Multi-tenant Aggregates

Multi-tenant Aggregates

  

Hi,

I'm working on a multi-tenant application and I'm having a problem with using aggregates.

Thing is, because the entities are configured to be multi-tenant, when I'm creating the aggregates they never return any data (they do work when I run the app), I'm guessing because it's being filtered by the TenantId.

So, is there a way to see data when creating the aggregates? Maybe a way to set a default tenant or something like that?

Solution

Hi,

Go to Module --> "Configure Tenant to Test Queries". Check attachment.

Solution

Nice!

I knew there had to be a way to do it.

Thanks!

Ok, now I have another problem.

When I test either aggregates or SQL queries to the table UserMT, they're also filtered by the Tenant Id.

Isn't the whole point of UserMT to see *all* users, regardless of the Tenant Id? I mean, if I wanted the users automatically filtered by Tenant Id, I could simply use the User entity, no?

I'm pretty sure this used to work way better in the old days...