Skip to content

Commit

Permalink
[hotfix] groupEntity와 memberEntity 간 조인 조건 명확히 하여 groupCode 관련 경로 표현식…
Browse files Browse the repository at this point in the history
… 오류 해결
  • Loading branch information
chahyunsoo committed Oct 10, 2024
1 parent 57a7a84 commit 655d30a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,15 @@ public Page<Post> findAllByBoardIdAndGroupCodeAndMemberCode(Long boardId, GroupC
if (memberCode != null) {
whereClause.and(memberEntity.memberCode.eq(memberCode));
}
// if (groupCode != null) {
// whereClause.and(groupEntity.groupCode.eq(groupCode));
// }

if (groupCode != null) {
whereClause.and(groupEntity.groupCode.eq(groupCode));
whereClause.and(groupEntity.isNotNull().and(groupEntity.groupCode.eq(groupCode)));
}


// if (whereClause.getValue() == null) {
// throw new IllegalArgumentException("At least one of memberCode, or groupCode must be provided");
// }
Expand All @@ -196,6 +201,7 @@ public Page<Post> findAllByBoardIdAndGroupCodeAndMemberCode(Long boardId, GroupC
.where(whereClause)
.orderBy(postEntity.createdAt.desc());


List<PostEntity> content = query
.offset(pageable.getOffset())
.limit(pageable.getPageSize())
Expand Down

0 comments on commit 655d30a

Please sign in to comment.