강의

멘토링

로드맵

Inflearn Community Q&A

leejohy's profile image
leejohy

asked

Java ORM Standard JPA Programming - Basics

Default Key Mapping

create-drop 설정 문의

Written on

·

178

0

안녕하세요 김영한 팀장님!

hibername.hbm2ddl.auto value를 create 또는 create-drop으로 해도 현재 엔티티의 GeneratedValue 전략이 Identity라면, 시퀀스 또는 테이블 전략에서 기존에 (테스트용으로 기존에 db에 반영을 해둔) 쓰였던 시퀀스 및 테이블은 자동으로 drop이 되지 않는 것 같습니다.

이 부분은 관련 전략을 쓸 때만 drop & 초기화 되는건가요?

JPAjava

Quiz

66% of people got it wrong. Give it a try!

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

1

yh님의 프로필 이미지
yh
Instructor

안녕하세요. dooong dooong님

코드가 바뀌어 버렸기 때문에 하이버네이트가 이전 정보까지 기억하지는 못합니다.

이 경우 직접 삭제해주셔야 합니다.

감사합니다.

leejohy's profile image
leejohy

asked

Ask a question