✔ 깃허브 소스코드
✔ Udemy 강의영상
org.springframework.transaction.annotation.Transactional
public void playWithEntityManager() {
logger.info("Play with Entity Manager Start................");
Course course = Course.builder().name("NEW COURSE").build();
entityManager.persist(course); // save
course.setName("UPDATE COURSE"); // update
}
entityManager.flush()
entityManager.detach(Object o)
entityManager.clear()
entityManager.refresh(Object o)