Skip to content

Commit

Permalink
[Fix] 모든 Quiz 정보를 가져오는 메서드의 N+1 문제를 최적화했습니다.
Browse files Browse the repository at this point in the history
  • Loading branch information
NARUBROWN committed Nov 29, 2024
1 parent 6d1e260 commit 35746c6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ public class Quiz {
private String message;
private String hint;

@BatchSize(size = 50)
@OneToMany(mappedBy = "quiz", cascade = CascadeType.REMOVE)
private List<Question> questions;

@BatchSize(size = 50)
@OneToMany(mappedBy = "quiz", cascade = CascadeType.REMOVE)
private List<Answer> answers;

Expand Down

0 comments on commit 35746c6

Please sign in to comment.