Skip to content

Commit

Permalink
πŸ› fix : λŒ“κΈ€ μ‘°νšŒμ‹œ μˆœμ„œκ°€ λ’€μ£½λ°•μ£½μœΌλ‘œ μ‘°νšŒλ˜λŠ” ν˜„μƒ ν•΄κ²° (#245)
Browse files Browse the repository at this point in the history
μ—¬λŸ¬λͺ…μ˜ μœ μ €κ°€ λŒ“κΈ€μ„ μž‘μ„±μ‹œ 일정 κ°œμˆ˜κ°€ λ„˜μ–΄μ Έμ„œ κ²°κ³Όκ°€ λŒ“κΈ€ μž‘μ„±μˆœμ΄ μ•„λ‹Œ λ’€μ£½λ°•μ£½ μ„žμ—¬μ„œ λ‚˜μ˜€λŠ” ν˜„μƒμ΄ λ°œμƒ
값을 DB에 μ‘°νšŒν• λ•Œ orderbyλ₯Ό 톡해 λŒ“κΈ€ μ΅œμ‹  μž‘μ„±μˆœμœΌλ‘œ μ •λ ¬ν•˜λ„λ‘ 둜직 μΆ”κ°€
  • Loading branch information
zxcv9203 committed Aug 14, 2022
1 parent 5d1e44c commit f4ed588
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.querydsl.core.types.Projections;
import com.querydsl.core.types.dsl.BooleanExpression;
import com.querydsl.jpa.JPQLQuery;
import com.querydsl.jpa.impl.JPAQuery;
import com.querydsl.jpa.impl.JPAQueryFactory;
import java.util.List;
import lombok.RequiredArgsConstructor;
Expand Down Expand Up @@ -39,7 +38,8 @@ public Page<CommentInfo> findAllByCondition(Search request, Pageable pageable) {
.from(comment)
.where(
eqPostId(request.postId())
);
)
.orderBy(comment.createdAt.asc());
long totalCount = query.fetchCount();
List<CommentInfo> comments = query
.offset(pageable.getOffset())
Expand Down

0 comments on commit f4ed588

Please sign in to comment.