0
jseger created
I'm wondering if Tenant ID is necessary on child objects AND if omitting can improve performance.
Let's say I have an Order which has a child list of Order Items. An Order obviously has a tenant id. But an Order Item cannot exist without an order, so does it need a tenant id? Probably not, but is there any risk omitting it? Is there any advantage omitting it? Any thoughts at all?
1 Answer(s)
-
0
Without tenant id, if you call OrderItemRepository.GetAll, then cross-tenant Order Items will appear. If you will never access child objects directly, then omitting tenant id is reasonable but unnecessary.
Performance-wise, omitting an 'int' column in a database table would have negligible improvement.