Skip to main content

Entity Mappings

Audience

Developers, QA and support engineers, data reviewers, implementation partners, solution architects, privacy reviewers and security reviewers.

Reference Content

Summary

Lifecycle mappings combine aggregate roots, configured children, owned values, logical cross-aggregate references and operational ledgers.

Mapping categories

CategoryExamplesDatabase behavior
Aggregate rootCandidate, Offer, Onboarding, Employee, Asset, ExitRequestIndependent key and lifecycle
Configured childCandidate stage history, Offer letter/revision/approval, Employee details, Asset assignment historyParent relationship; configured cascades where confirmed
Owned valueCandidate name, Offer compensation, Employee employmentStored as part of owner lifecycle
Logical referenceOnboarding to candidate/offer/employee, Employee to organization/managerIdentifier without configured EF navigation relationship
ProjectionPayroll/Leave/Attendance employee profileConsumer-owned local state
Operational ledgerOutbox, processed event, delivery attemptDelivery/idempotency evidence

Aggregate view

Design implication

Logical references preserve service boundaries but move existence and staleness validation to application/integration code. Owned values cannot be independently versioned or retained without their owner. Operational ledgers must not be treated as domain aggregates.

Requires confirmation

Unless explicitly confirmed above, production migration governance, rollback, reconciliation, retention, privacy, performance, concurrency and operational ownership require confirmation.

Source References

  • microservices/src/recruitment-service/Infrastructure/RecruitmentDbContext.cs
  • microservices/src/employee-service/Infrastructure/EmployeeDbContext.cs
  • Data/AppDbContext.cs

See Also

Keywords

  • Onboarding database
  • Offboarding database
  • Lifecycle persistence

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-20
  • Review cycle: Quarterly