Skip to content

Commit

Permalink
fix: envelope, ledger 쿼리 eq_ref 적용되도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
wjdtkdgns committed Aug 3, 2024
1 parent bfcf7f7 commit 6e6f001
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ class EnvelopeQRepositoryImpl : EnvelopeQRepository, QuerydslRepositorySupport(E
).from(qEnvelope)
.join(qUser).on(qEnvelope.uid.eq(qUser.id))
.join(qFriendRelationship).on(qEnvelope.friendId.eq(qFriendRelationship.friendId))
.join(qCategoryAssignment).on(qEnvelope.id.eq(qCategoryAssignment.targetId))
.join(qCategoryAssignment).on(qEnvelope.id.eq(qCategoryAssignment.targetId).and(qCategoryAssignment.targetType.eq(CategoryAssignmentType.ENVELOPE)))
.where(
qEnvelope.amount.between(minAmount, maxAmount),
qEnvelope.uid.notIn(uid),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ class LedgerQRepositoryImpl : LedgerQRepository, QuerydslRepositorySupport(Ledge
)
)
.from(qLedger)
.join(qCategoryAssignment).on(qLedger.id.eq(qCategoryAssignment.targetId))
.join(qCategoryAssignment).on(
qLedger.id.eq(qCategoryAssignment.targetId)
.and(qCategoryAssignment.targetType.eq(CategoryAssignmentType.LEDGER))
)
.where(qLedger.uid.eq(uid))
.groupBy(qCategoryAssignment.categoryId)
.fetch()
Expand Down

0 comments on commit 6e6f001

Please sign in to comment.