Skip to content

DAR-148 — Add JPA associations to KycRequest and KycReview

Summary

  • KycRequest: added @OneToMany association to KycDocument (via kyc_id), @OneToOne to KycReview (mapped by kycRequest), and @OneToOne to InvestorProfile (via user_id)
  • KycReview: added @OneToOne back-reference to KycRequest (via kyc_id)
  • All associations use FetchType.LAZY and are read-only (insertable = false, updatable = false)

Motivation

Consuming services need to navigate the KYC object graph (request → documents, review, investor profile) without issuing separate queries per entity. These associations enable that without changing the underlying schema.

Notes

  • No schema changes — join columns already exist in the DB
  • No Spring context introduced — JAR remains context-free

Rapports de requête de fusion