Merge pull request #19 from codej99/feature/board

영속성 컨텍스트의 변경감지(dirty checking)가 적용으로 인한 소스 수정
This commit is contained in:
codej99
2019-08-05 22:25:29 +09:00
committed by GitHub

View File

@@ -55,6 +55,7 @@ public class BoardService {
if (!uid.equals(user.getUid())) if (!uid.equals(user.getUid()))
throw new CNotOwnerException(); throw new CNotOwnerException();
// 영속성 컨텍스트의 변경감지(dirty checking) 기능에 의해 조회한 Post내용을 변경만 해도 Update쿼리가 실행됩니다.
post.setUpdate(paramsPost.getAuthor(), paramsPost.getTitle(), paramsPost.getContent()); post.setUpdate(paramsPost.getAuthor(), paramsPost.getTitle(), paramsPost.getContent());
return post; return post;
} }