강의

멘토링

로드맵

Inflearn Community Q&A

bhsbhs2351964's profile image
bhsbhs2351964

asked

Java ORM Standard JPA Programming - Basics

Default Key Mapping

IDENTITY 전략 영속성 텍스트 상태

Resolved

Written on

·

233

1

안녕하십니까

기본 키 매핑 강의 23:37분에 IDENTITY 시퀀스 전략을 사용할 때, em.persist(member)를 할 때 키를 모르기 때문에 바로 Insert 문을 날린다고 하셨는데 그럼 이때 트랜잭션 커밋 한것 처럼 영속성 컨텍스트 상태에 있는 모든 상태가 적용되나요? 아니면 em.persist(member)만 적용되나요?

JPAjava

Quiz

A class using the `@Entity` annotation for JPA mapping must basically meet these important conditions: 1. It must have a no-argument constructor (default constructor). 2. It must have a field representing the primary key, usually marked with the `@Id` annotation. 3. The class itself cannot be `final`. 4. It cannot be an `enum` or an `interface`.

All fields must be public

must be a final class

Must have a public or protected default constructor

must include at least one static method

Answer 1

2

yh님의 프로필 이미지
yh
Instructor

안녕하세요. 배효성님

em.persist(member)만 적용됩니다.

감사합니다.

bhsbhs2351964's profile image
bhsbhs2351964

asked

Ask a question