Skip to content

Commit

Permalink
[#139] refactor: category 주석 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
shin-mallang committed Dec 8, 2023
1 parent 4feab60 commit 68d6cf8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/mallang/category/domain/Category.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ public List<Category> getSortedChildren() {
return categories;
}

// For lazy loading issue
// parent, prev, next 가 지연로딩되어 프록시로 조회되므로, 그냥 사용 시 update 가 동작하지 않음
// 이를 해결하기 위해 메서드를 통해 접근해야 하는데, private 혹은 package-private 경우 여전히 동작하지 않음
// 따라서 protected 로 설정한
// lazy loading issue 해결을 위한 메서드
// 카테고리 조회 시 parent, prev, next 가 지연로딩되어 프록시로 조회되므로, prev.next = this 등으로 사용 시 update 가 동작하지 않음
// 이를 해결하기 위해 메서드를 통해 접근해야 하는데 private 혹은 package-private 메서드의 경우 여전히 동작하지 않음
// 따라서 protected 로 설정함
protected void setPreviousSibling(Category previousSibling) {
this.previousSibling = previousSibling;
}
Expand Down

0 comments on commit 68d6cf8

Please sign in to comment.