Skip to content

Commit

Permalink
Fix: STT 상태 조회시 발생하는 null pointer exception 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
yugyeom-ghim committed Nov 15, 2024
1 parent ceaf1c3 commit 4b5e9f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/notai/stt/query/SttQueryRepositoryImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ public List<Stt> findAllByDocumentIdAndPageNumber(Long documentId, Integer pageN
return queryFactory
.selectFrom(stt)
.join(stt.sttTask, sttTask).fetchJoin()
.join(sttTask.recording).fetchJoin()
.join(sttTask.recording.document).fetchJoin()
.where(stt.sttTask.recording.document.id.eq(documentId)
.and(stt.pageNumber.eq(pageNumber)))
.and(stt.pageNumber.eq(pageNumber)))
.fetch();
}

Expand All @@ -27,6 +29,8 @@ public List<Stt> findAllByDocumentId(Long documentId) {
return queryFactory
.selectFrom(stt)
.join(stt.sttTask, sttTask).fetchJoin()
.join(sttTask.recording).fetchJoin()
.join(sttTask.recording.document).fetchJoin()
.where(stt.sttTask.recording.document.id.eq(documentId))
.fetch();
}
Expand Down

0 comments on commit 4b5e9f2

Please sign in to comment.