Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
상민님 오랫만입니다. ㅎㅎ
게시물 좋아요 기능에 대해서 테이블을 따로 분리했는데,
게시물 조회할때 기본적으로 게시물 좋아요 갯수를 출력해줘야하는데 그럼 게시물 1개 조회할때마나 좋아요 테
이블에 가서 해당 게시물에 대한 좋아요 갯수를 가져와야 되잖아요??
그래서, 좋아요 갯수에 대해서는 게시물 테이블에 컬럼하나 추가하는 방식으로 바꿨습니다.
그런데, 이렇게 할 경우 좋아요를 누르거나 취소할때, 게시물 테이블에있는 좋아요 갯수 컬럼 값변경 및 좋아요 테이블에 있는 컬럼 추가/삭제 작업이 필요한데요... 즉, 2개의 작업의 트랜잭션이 필요할거 같은데.. 어떻게 하면 좋을지 리뷰 뷰탁드립니당.