Skip to content

[FEAT] 문서 참조 영속 모델과 Repository 기능 구현 - #201

Merged
poketopa merged 2 commits into
developfrom
feat/200
Aug 12, 2026
Merged

[FEAT] 문서 참조 영속 모델과 Repository 기능 구현#201
poketopa merged 2 commits into
developfrom
feat/200

Conversation

@jyt6640

@jyt6640 jyt6640 commented Aug 12, 2026

Copy link
Copy Markdown
Member

관련 이슈

Closes #200

변경 배경

현재 그래프 조회는 크루 문서 본문에서 참조 링크를 요청마다 추출하고 계산한다.

후속 문서 쓰기 동기화, backfill 및 영속 참조 조회가 동일한 저장 구조와 제약을 사용할 수 있도록 source CrewDocument -> target Document 방향성 참조 모델과 Repository를 추가한다.

변경 내용

  • DocumentReference JPA entity 추가
  • source-target 유일 제약과 source·target index 및 FK 선언
  • source 기준 조회 Repository 메서드 추가
  • outgoing·incoming 참조 삭제 Repository 메서드 추가
  • DocumentReferenceFixture와 Repository 통합 테스트 추가
  • CrewDocumentOrganizationDocument target 저장·조회 검증
  • reference 삭제가 source·target Document로 전파되지 않도록 cascade 제한

검증

  • 테스트 통과
    • Eclipse Temurin JDK 17 Docker 환경에서 전체 테스트 112개 통과
    • failures 0, errors 0, skipped 0
    • DocumentReferenceRepositoryTest 9개 통과
  • 변경 동작 확인
    • MySQL 8.0.41에서 애플리케이션 기동 및 Hibernate schema 생성 확인
    • uk_document_reference_source_target 유일 제약 확인
    • idx_document_reference_source, idx_document_reference_target index 확인
    • fk_document_reference_source, fk_document_reference_target FK 확인
    • 두 FK의 삭제 규칙이 NO ACTION임을 확인

영향 및 참고사항

  • document_reference 테이블이 Hibernate ddl-auto: update를 통해 추가된다.
  • 기존 서비스와 API 동작은 변경하지 않았다.
  • 문서 생성·수정 시 참조 동기화, 기존 데이터 backfill 및 그래프 조회 전환은 후속 작업 범위다.
  • 문서 삭제 전에 outgoing·incoming 참조를 제거하는 연동이 필요하다.
  • 해당 삭제 연동 전에는 참조 쓰기 동기화와 backfill을 활성화하면 안 된다.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 57466310-f783-4e86-b426-025e26be694b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@jyt6640
jyt6640 requested review from poketopa and sun007021 August 12, 2026 11:31
@poketopa
poketopa merged commit cefcc20 into develop Aug 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants