Let’s say we have the following entity model (similar to that of the SaaS demo Studio project):
Client - 1..* - Customer Customer - 1..* - Order Order - 1..* - OrderItem Customer - 1..* - Address ... and so on
If a user is a member of an access group which limits visibility of the Client entity to one with a specific ID, is there a way to get that constraint to implicitly propagate down the chain of one-to-many associations, so that the user can only see Customers which belong to their permitted Client, and only see Orders and Addresses which belong to Customers which belong to their permitted client, etc.
I know we can set up individual constraints for each entity, but this would be time-consuming and error-prone. It would be much easier if we could just set up the constraint on the highest-level entity and have it automatically apply to all associated entities along the one-to-many (and, of course, one-to-one) association path.