강의

멘토링

로드맵

Inflearn Community Q&A

dyko37863634's profile image
dyko37863634

asked

Java ORM Standard JPA Programming - Basics

Default Key Mapping

궁금한게 있어 질의드립니다!

Written on

·

335

0

IDENTITY 전략은 em.persist() 시점에 즉시 INSERT SQL 실행 하고 DB에서 식별자를 조회

라는 내용과 관련하여 질의드립니다.

commit을 주석처리하여도 정상적으로 insert되는게 확인되었습니다. 근데 실질적으로 db에 저장된 값은없는데 이러한경우 영속성컨텍스트에만 저장이되어있는 상태인건가요?! 

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

0

yh님의 프로필 이미지
yh
Instructor

안녕하세요. 고대연님

생각하신 내용이 맞습니다.

감사합니다.

dyko37863634's profile image
dyko37863634

asked

Ask a question