QueryDSL 도입 #53
morenow98
started this conversation in
backend-tech
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
QureyDSL 도입
@Query(value = "select * from problem where subject_id = :subjectId order by rand() limit :count", nativeQuery = true) List<Problem> findRandomBySubjectId(Long subjectId, int count);
외부 모듈에 의존한다는 단점을 제외하면 코드의 관리와 직관성 면에서 우수한 3번을 택했다.
하지만, 쿼리 성능을 위해 Discussion이 필요하다.
Beta Was this translation helpful? Give feedback.
All reactions