sada-dream / sada-dream_server_v2

개인간 해외 직구 중계 플랫폼 사다드림입니다.
MIT License
0 stars 0 forks source link

자바 ORM 표준 JPA 프로그래밍 - 기본편 - 영속성 관리 - 내부 동작 방식 #109

Open dongwooklee96 opened 3 years ago

dongwooklee96 commented 3 years ago

영속성 컨텍스트

Screen Shot 2021-08-08 at 2 20 47 AM

엔티티의 생명 주기

영속성 컨텍스트의 이점

dongwooklee96 commented 3 years ago

플러시

영속성 컨텍스트를 플러시 하는 방법

플러시를 이해할 때 주의할점

dongwooklee96 commented 3 years ago

준영속 상태

준영속 상태로 만드는 방법

dongwooklee96 commented 3 years ago

엔티티 맵핑

dongwooklee96 commented 3 years ago

UNIQUE 제약 조건 같은 경우는 아래와 같이 컬럼에 추가할 수 있다.


@Getter
@Setter
@Entity
@AllArgsConstructor
@NoArgsConstructor
public class Member {
    @Id
    private Long id;
    @Column(unique = true, length = 10)
    private String name;
    private Long age;
}