Basically, imagine we have 2 Entities:
User and UserTenantLink. UserTenantLink has a OneToOne connection to User. User has a tenant field, UserTenantLink does not. As soon as a User attempts a Login, A UserTenantLink with the correct user Id is search and if it is found, the corresponding tenanant Context is opened for that request (which happens for almost every request).
But I have found that UserTenantLink will fetch User even outside the tenant context. I don't know if that is intended behavior since the whole point of a tenant context is to cleanly separate certain entites from each other so they can never be loaded together (which is now technically possible by joining them to a non tenant discriminated entitiy)
I feel like you should never be able to access tenant discriminated data outside of its own tenant context.
Comment From: snicoll
Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.