Pessimistic Lock

· 프로젝트
문제점이 있었던 코드 댓글을 저장하는 로직 @Transactional public void create(CommentCreateRequestDto requestDto, User user) { Long postId = requestDto.getPostId(); Post post = findPostByPostId(postId); Comment child = requestDto.toEntity(user, post); requestDto.getCommentIdOptional().ifPresent(commentId -> linkParent(commentId, child)); commentRepository.save(child); post.increaseCommentCount(); } 게시글과 댓글의 관계에서 1개..
솜사탕코튼
'Pessimistic Lock' 태그의 글 목록