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 109d742
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/java/notai/stt/query/SttQueryRepositoryImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,24 @@ public class SttQueryRepositoryImpl implements SttQueryRepository {
public List<Stt> findAllByDocumentIdAndPageNumber(Long documentId, Integer pageNumber) {
return queryFactory
.selectFrom(stt)
.join(stt.sttTask, sttTask).fetchJoin()
.innerJoin(stt.sttTask, sttTask).fetchJoin()
.innerJoin(sttTask.recording).fetchJoin()
.innerJoin(sttTask.recording.document).fetchJoin()
.where(stt.sttTask.recording.document.id.eq(documentId)
.and(stt.pageNumber.eq(pageNumber)))
.and(stt.pageNumber.eq(pageNumber)))
.orderBy(stt.pageNumber.asc())
.fetch();
}

@Override
public List<Stt> findAllByDocumentId(Long documentId) {
return queryFactory
.selectFrom(stt)
.join(stt.sttTask, sttTask).fetchJoin()
.innerJoin(stt.sttTask, sttTask).fetchJoin()
.innerJoin(sttTask.recording).fetchJoin()
.innerJoin(sttTask.recording.document).fetchJoin()
.where(stt.sttTask.recording.document.id.eq(documentId))
.orderBy(stt.pageNumber.asc())
.fetch();
}
}

0 comments on commit 109d742

Please sign in to comment.