작성
·
358
0
제가 셋팅을 다르게 한 건지 모르겠는데
콘솔창에 create, insert쿼리는 뜨는고
업데이트 쿼리는 따로 안 뜨는데
이유를 알 수 있을까요?
try {
Address address = new Address("city", "street", "zipcode");
Member member1 = new Member();
member1.setUsername("member1");
member1.setHomeAddress(address);
member1.setWorkPeriod(new Period());
Member member2 = new Member();
member2.setUsername("member2");
member2.setHomeAddress(address);
member2.setWorkPeriod(new Period());
member1.getHomeAddress().setCity("newCity");
em.persist(member1);
em.persist(member2);
tx.commit();
이건 똑같이 작성했씁니다.