Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Tenant Id foreign key constraint not added for new entities #7658


User avatar
0
moetarhini created

I am using Aspnetzero framework with Angular 8. when I add new entity that implements IMustHaveTenant the TenantId is added to the entity table but the foreign key constraint is not added. My question is should we add this constrain for data integrity with AbpTenant table or not?. If yes what is the best practice to add it.


3 Answer(s)
  • User Avatar
    1
    BobIngham created

    @moetarhini - there is no foreign key because it is a multi-database solution. Your entity may not be in the same database as your tenant.

  • User Avatar
    0
    maliming created
    Support Team

    https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4865

  • User Avatar
    0
    moetarhini created

    Thanks guys