Part of the Wolverine conjoined EF Core multi-tenancy epic (JasperFx/wolverine#3465).
Marten (Marten.Metadata.ITenanted) and Polecat (Polecat.Metadata.ITenanted) declare identical empty marker interfaces extending JasperFx.MultiTenancy.IHasTenantId:
public interface ITenanted : IHasTenantId {}
Wolverine is about to need the same marker for conjoined EF Core tenancy, where ITenanted on an EF entity opts it into Wolverine-managed conjoined multi-tenancy (mapped tenant_id column, tenant-bound global query filter, stamp-on-insert, cross-tenant write rejection) — mirroring what the marker already means for Marten and Polecat documents.
Proposed work
- Add
ITenanted : IHasTenantId to JasperFx.MultiTenancy, with the settable-TenantId doc contract both libraries already imply ("the framework sets TenantId on write and populates it from storage on load").
- Marten: re-point
Marten.Metadata.ITenanted at the JasperFx interface (type-forward/alias, same pattern used when TenancyStyle moved).
- Polecat: same for
Polecat.Metadata.ITenanted.
This follows the IHasTenantId dedupe from #224 — one marker drives conjoined behavior across Marten, Polecat, and Wolverine so a shared entity/document type works in all three.
Small change, but it should lead the next lockstep release since the Wolverine epic keys off it.
Part of the Wolverine conjoined EF Core multi-tenancy epic (JasperFx/wolverine#3465).
Marten (
Marten.Metadata.ITenanted) and Polecat (Polecat.Metadata.ITenanted) declare identical empty marker interfaces extendingJasperFx.MultiTenancy.IHasTenantId:Wolverine is about to need the same marker for conjoined EF Core tenancy, where
ITenantedon an EF entity opts it into Wolverine-managed conjoined multi-tenancy (mappedtenant_idcolumn, tenant-bound global query filter, stamp-on-insert, cross-tenant write rejection) — mirroring what the marker already means for Marten and Polecat documents.Proposed work
ITenanted : IHasTenantIdtoJasperFx.MultiTenancy, with the settable-TenantIddoc contract both libraries already imply ("the framework setsTenantIdon write and populates it from storage on load").Marten.Metadata.ITenantedat the JasperFx interface (type-forward/alias, same pattern used whenTenancyStylemoved).Polecat.Metadata.ITenanted.This follows the
IHasTenantIddedupe from #224 — one marker drives conjoined behavior across Marten, Polecat, and Wolverine so a shared entity/document type works in all three.Small change, but it should lead the next lockstep release since the Wolverine epic keys off it.