영속성 컨텍스트의 변경감지(dirty checking)가 적용으로 인한 소스 수정

This commit is contained in:
kimyonghwa
2019-05-16 22:07:28 +09:00
parent c6110eb806
commit 458de9d927

View File

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