코드 그라데이션
엔티티 매핑 4 - 기본키 매핑 본문
기본 키 매핑 어노테이션
기본 키 매핑 방법
AUTO는 셋 중에 하나가 데이터베이스 방언에 맞춰서 선택이 되는 것
IDENTITY 전략 - 특징
실습
다시
<property name="hibernate.hbm2ddl.auto" value="create" />
로 바꾸고
Member 클래스는 이정도만 남겨놓고
@Entity
@NoArgsConstructor
public class Member {
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id; // String으로 했길래 바꿔서 했는데 안 되었다 >< 오류의 원인이라고...
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Column(name = "name", nullable = false)
private String username;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}
public class JpaMain {
public static void main(String[] args) {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("hello");
EntityManager em = emf.createEntityManager();
EntityTransaction tx = em.getTransaction();
tx.begin();
try {
Member member = new Member();
member.setUsername("C");
em.persist(member);
tx.commit();
} catch (Exception e) {
tx.rollback();
} finally {
em.close();
}
emf.close();
}
}
insert 쿼리가 나감
Hibernate:
/* insert inflearn.exjpa.Member
*/ insert
into
Member
(id, name)
values
(default, ?)
create문은
create table Member (
id varchar(255) generated by default as identity,
name varchar(255) not null,
현재는 H2 방언으로 설정되어 있으므로 이걸 MySQL 방언으로 바꿔주면
<!-- <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>-->
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
결과가
이렇게 나온다.
다시 확인해보면
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
처음 member를 세팅하면
잠깐 create를 update로 바꿔놓고
두 번째 멤버를 세팅해주면(ID 지정은 x)
Member member2 = new Member();
member2.setUsername("D");
em.persist(member2);
결과는
ID가 자동으로 하나 증가하는 것을 확인할 수 있음.
SEQUENCE
SEQUENCE 전략 - 특징
SEQUENCE 전략 - 매핑
SEQUENCE - @SequenceGenerator
실습
다시 update를 create로 바꿔놓고 실습 진행
@Id @GeneratedValue(strategy = GenerationType.SEQUENCE)
private Long id;
콘솔 창에는
drop sequence if exists hibernate_sequence
Hibernate:
drop sequence if exists hibernate_sequence
14:29:45.241 [main] DEBUG org.hibernate.SQL - create sequence hibernate_sequence start with 1 increment by 1
Hibernate: create sequence hibernate_sequence start with 1 increment by 1
이렇게 메시지 나오고
public class JpaMain {
public static void main(String[] args) {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("hello");
EntityManager em = emf.createEntityManager();
EntityTransaction tx = em.getTransaction();
tx.begin();
try {
Member member = new Member(); // id 값은 자동으로 생성됩니다.
member.setUsername("A");
em.persist(member);
tx.commit();
} catch (Exception e) {
tx.rollback();
} finally {
em.close();
}
emf.close();
}
}
결과는
create를 none으로 바꾸고(주석처리) 한 번 더 실행을 해보면
시퀀스에서 값을 가져온 다음에 세팅을 해서
(?, ?)의 뒤 ? 에 2가 세팅이 되어 들어가게 된다.
결과는
시퀀스를 항상 달리 설정(구분)하고 싶다면
이렇게 따로 두면 된다.
다시 create로 바꾸고
@Entity
@NoArgsConstructor
@SequenceGenerator(name = "member_seq_generator", sequenceName = "member_seq") //매핑할 데이터베이스 시퀀스 이름
public class Member {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "member_seq_generator")
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Column(name = "name", nullable = false)
private String username;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}
이 상태에서 실행을 해 보면
drop sequence if exists member_seq
Hibernate:
drop sequence if exists member_seq
14:43:32.561 [main] DEBUG org.hibernate.SQL - create sequence member_seq start with 1 increment by 50
시퀀스를 이렇게 만듦.
TABLE 전략
TABLE 전략 - 매핑
@TableGenerator - 속성
실습
코드는 이렇게 바꿔주고
실행 결과
"C:\Program Files\Zulu\zulu-8\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\lib\idea_rt.jar=64094:C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Zulu\zulu-8\jre\lib\cat.jar;C:\Program Files\Zulu\zulu-8\jre\lib\charsets.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\cldrdata.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\crs-agent.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\dnsns.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\jaccess.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\legacy8ujsse.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\localedata.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\nashorn.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\openjsse.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\sunec.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\sunmscapi.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\zipfs.jar;C:\Program Files\Zulu\zulu-8\jre\lib\jce.jar;C:\Program Files\Zulu\zulu-8\jre\lib\jfr.jar;C:\Program Files\Zulu\zulu-8\jre\lib\jsse.jar;C:\Program Files\Zulu\zulu-8\jre\lib\management-agent.jar;C:\Program Files\Zulu\zulu-8\jre\lib\resources.jar;C:\Program Files\Zulu\zulu-8\jre\lib\rt.jar;C:\Mega_Spring\inf\exjpa\target\classes;C:\Users\eui44\.m2\repository\com\h2database\h2\1.4.199\h2-1.4.199.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot-starter\2.7.14\spring-boot-starter-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot\2.7.14\spring-boot-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-context\5.3.29\spring-context-5.3.29.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-expression\5.3.29\spring-expression-5.3.29.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.7.14\spring-boot-autoconfigure-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.7.14\spring-boot-starter-logging-2.7.14.jar;C:\Users\eui44\.m2\repository\ch\qos\logback\logback-classic\1.2.12\logback-classic-1.2.12.jar;C:\Users\eui44\.m2\repository\ch\qos\logback\logback-core\1.2.12\logback-core-1.2.12.jar;C:\Users\eui44\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.17.2\log4j-to-slf4j-2.17.2.jar;C:\Users\eui44\.m2\repository\org\apache\logging\log4j\log4j-api\2.17.2\log4j-api-2.17.2.jar;C:\Users\eui44\.m2\repository\org\slf4j\jul-to-slf4j\1.7.36\jul-to-slf4j-1.7.36.jar;C:\Users\eui44\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-core\5.3.29\spring-core-5.3.29.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-jcl\5.3.29\spring-jcl-5.3.29.jar;C:\Users\eui44\.m2\repository\org\yaml\snakeyaml\1.30\snakeyaml-1.30.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\2.7.14\spring-boot-starter-data-jpa-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot-starter-aop\2.7.14\spring-boot-starter-aop-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-aop\5.3.29\spring-aop-5.3.29.jar;C:\Users\eui44\.m2\repository\org\aspectj\aspectjweaver\1.9.7\aspectjweaver-1.9.7.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\2.7.14\spring-boot-starter-jdbc-2.7.14.jar;C:\Users\eui44\.m2\repository\com\zaxxer\HikariCP\4.0.3\HikariCP-4.0.3.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-jdbc\5.3.29\spring-jdbc-5.3.29.jar;C:\Users\eui44\.m2\repository\jakarta\transaction\jakarta.transaction-api\1.3.3\jakarta.transaction-api-1.3.3.jar;C:\Users\eui44\.m2\repository\jakarta\persistence\jakarta.persistence-api\2.2.3\jakarta.persistence-api-2.2.3.jar;C:\Users\eui44\.m2\repository\org\hibernate\hibernate-core\5.6.15.Final\hibernate-core-5.6.15.Final.jar;C:\Users\eui44\.m2\repository\org\jboss\logging\jboss-logging\3.4.3.Final\jboss-logging-3.4.3.Final.jar;C:\Users\eui44\.m2\repository\net\bytebuddy\byte-buddy\1.12.23\byte-buddy-1.12.23.jar;C:\Users\eui44\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\eui44\.m2\repository\org\jboss\jandex\2.4.2.Final\jandex-2.4.2.Final.jar;C:\Users\eui44\.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;C:\Users\eui44\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.1.2.Final\hibernate-commons-annotations-5.1.2.Final.jar;C:\Users\eui44\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.8\jaxb-runtime-2.3.8.jar;C:\Users\eui44\.m2\repository\org\glassfish\jaxb\txw2\2.3.8\txw2-2.3.8.jar;C:\Users\eui44\.m2\repository\com\sun\istack\istack-commons-runtime\3.0.12\istack-commons-runtime-3.0.12.jar;C:\Users\eui44\.m2\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;C:\Users\eui44\.m2\repository\org\springframework\data\spring-data-jpa\2.7.14\spring-data-jpa-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\data\spring-data-commons\2.7.14\spring-data-commons-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-orm\5.3.29\spring-orm-5.3.29.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-tx\5.3.29\spring-tx-5.3.29.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-beans\5.3.29\spring-beans-5.3.29.jar;C:\Users\eui44\.m2\repository\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-aspects\5.3.29\spring-aspects-5.3.29.jar;C:\Users\eui44\.m2\repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.3\jakarta.xml.bind-api-2.3.3.jar;C:\Users\eui44\.m2\repository\jakarta\activation\jakarta.activation-api\1.2.2\jakarta.activation-api-1.2.2.jar" inflearn.exjpa.JpaMain
15:46:01.649 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Log4j2LoggerProvider
15:46:01.745 [main] DEBUG org.hibernate.jpa.HibernatePersistenceProvider - Located and parsed 1 persistence units; checking each
15:46:01.745 [main] DEBUG org.hibernate.jpa.HibernatePersistenceProvider - Checking persistence-unit [name=hello, explicit-provider=null] against incoming persistence unit name [hello]
15:46:01.746 [main] DEBUG org.hibernate.jpa.boot.spi.ProviderChecker - No PersistenceProvider explicitly requested, assuming Hibernate
15:46:01.751 [main] DEBUG org.hibernate.jpa.internal.util.LogHelper - PersistenceUnitInfo [
name: hello
persistence provider classname: null
classloader: null
excludeUnlistedClasses: false
JTA datasource: null
Non JTA datasource: null
Transaction type: RESOURCE_LOCAL
PU root URL: file:/C:/Mega_Spring/inf/exjpa/target/classes/
Shared Cache Mode: null
Validation Mode: null
Jar files URLs []
Managed classes names []
Mapping files names []
Properties [
hibernate.use_sql_comments: true
javax.persistence.jdbc.user: sa
hibernate.dialect: org.hibernate.dialect.H2Dialect
javax.persistence.jdbc.url: jdbc:h2:tcp://localhost/~/test
hibernate.format_sql: true
javax.persistence.jdbc.driver: org.h2.Driver
hibernate.hbm2ddl.auto: create
hibernate.show_sql: true
javax.persistence.jdbc.password: ]
15:46:01.757 [main] DEBUG org.hibernate.integrator.internal.IntegratorServiceImpl - Adding Integrator [org.hibernate.cfg.beanvalidation.BeanValidationIntegrator].
15:46:01.759 [main] DEBUG org.hibernate.integrator.internal.IntegratorServiceImpl - Adding Integrator [org.hibernate.secure.spi.JaccIntegrator].
15:46:01.763 [main] DEBUG org.hibernate.integrator.internal.IntegratorServiceImpl - Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
15:46:01.809 [main] INFO org.hibernate.Version - HHH000412: Hibernate ORM core version 5.6.15.Final
15:46:01.809 [main] DEBUG org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found
15:46:01.966 [main] DEBUG org.hibernate.service.spi.ServiceBinding - Overriding existing service binding [org.hibernate.secure.spi.JaccService]
15:46:01.977 [main] DEBUG org.hibernate.cache.internal.RegionFactoryInitiator - Cannot default RegionFactory based on registered strategies as `[]` RegionFactory strategies were registered
15:46:01.978 [main] DEBUG org.hibernate.cache.internal.RegionFactoryInitiator - Cache region factory : org.hibernate.cache.internal.NoCachingRegionFactory
15:46:01.994 [main] INFO org.hibernate.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
15:46:02.926 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration boolean -> org.hibernate.type.BooleanType@235834f2
15:46:02.926 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration boolean -> org.hibernate.type.BooleanType@235834f2
15:46:02.926 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Boolean -> org.hibernate.type.BooleanType@235834f2
15:46:02.927 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration numeric_boolean -> org.hibernate.type.NumericBooleanType@76505305
15:46:02.927 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration true_false -> org.hibernate.type.TrueFalseType@73a1e9a9
15:46:02.928 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration yes_no -> org.hibernate.type.YesNoType@4802796d
15:46:02.929 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration byte -> org.hibernate.type.ByteType@1bb5a082
15:46:02.929 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration byte -> org.hibernate.type.ByteType@1bb5a082
15:46:02.929 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Byte -> org.hibernate.type.ByteType@1bb5a082
15:46:02.930 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration character -> org.hibernate.type.CharacterType@33d512c1
15:46:02.930 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration char -> org.hibernate.type.CharacterType@33d512c1
15:46:02.930 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Character -> org.hibernate.type.CharacterType@33d512c1
15:46:02.931 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration short -> org.hibernate.type.ShortType@765d7657
15:46:02.931 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration short -> org.hibernate.type.ShortType@765d7657
15:46:02.931 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Short -> org.hibernate.type.ShortType@765d7657
15:46:02.932 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration integer -> org.hibernate.type.IntegerType@5e0e82ae
15:46:02.932 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration int -> org.hibernate.type.IntegerType@5e0e82ae
15:46:02.932 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Integer -> org.hibernate.type.IntegerType@5e0e82ae
15:46:02.933 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration long -> org.hibernate.type.LongType@2b71e916
15:46:02.934 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration long -> org.hibernate.type.LongType@2b71e916
15:46:02.934 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Long -> org.hibernate.type.LongType@2b71e916
15:46:02.934 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration float -> org.hibernate.type.FloatType@62379589
15:46:02.934 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration float -> org.hibernate.type.FloatType@62379589
15:46:02.935 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Float -> org.hibernate.type.FloatType@62379589
15:46:02.935 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration double -> org.hibernate.type.DoubleType@776aec5c
15:46:02.935 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration double -> org.hibernate.type.DoubleType@776aec5c
15:46:02.935 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Double -> org.hibernate.type.DoubleType@776aec5c
15:46:02.937 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration big_decimal -> org.hibernate.type.BigDecimalType@408d971b
15:46:02.937 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.math.BigDecimal -> org.hibernate.type.BigDecimalType@408d971b
15:46:02.939 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration big_integer -> org.hibernate.type.BigIntegerType@292b08d6
15:46:02.939 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.math.BigInteger -> org.hibernate.type.BigIntegerType@292b08d6
15:46:02.940 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration string -> org.hibernate.type.StringType@3c41ed1d
15:46:02.940 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.String -> org.hibernate.type.StringType@3c41ed1d
15:46:02.940 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration nstring -> org.hibernate.type.StringNVarcharType@43bc63a3
15:46:02.940 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration ncharacter -> org.hibernate.type.CharacterNCharType@40a4337a
15:46:02.941 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration url -> org.hibernate.type.UrlType@327514f
15:46:02.941 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.net.URL -> org.hibernate.type.UrlType@327514f
15:46:02.942 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration Duration -> org.hibernate.type.DurationType@3b69e7d1
15:46:02.942 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.Duration -> org.hibernate.type.DurationType@3b69e7d1
15:46:02.954 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration Instant -> org.hibernate.type.InstantType@3eb738bb
15:46:02.954 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.Instant -> org.hibernate.type.InstantType@3eb738bb
15:46:02.955 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration LocalDateTime -> org.hibernate.type.LocalDateTimeType@9d5509a
15:46:02.955 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.LocalDateTime -> org.hibernate.type.LocalDateTimeType@9d5509a
15:46:02.956 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration LocalDate -> org.hibernate.type.LocalDateType@7eac9008
15:46:02.956 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.LocalDate -> org.hibernate.type.LocalDateType@7eac9008
15:46:02.957 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration LocalTime -> org.hibernate.type.LocalTimeType@1a677343
15:46:02.957 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.LocalTime -> org.hibernate.type.LocalTimeType@1a677343
15:46:02.958 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration OffsetDateTime -> org.hibernate.type.OffsetDateTimeType@7c6908d7
15:46:02.958 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.OffsetDateTime -> org.hibernate.type.OffsetDateTimeType@7c6908d7
15:46:02.959 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration OffsetTime -> org.hibernate.type.OffsetTimeType@4b2bac3f
15:46:02.959 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.OffsetTime -> org.hibernate.type.OffsetTimeType@4b2bac3f
15:46:02.961 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration ZonedDateTime -> org.hibernate.type.ZonedDateTimeType@2aceadd4
15:46:02.961 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.ZonedDateTime -> org.hibernate.type.ZonedDateTimeType@2aceadd4
15:46:02.962 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration date -> org.hibernate.type.DateType@45c7e403
15:46:02.962 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.sql.Date -> org.hibernate.type.DateType@45c7e403
15:46:02.963 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration time -> org.hibernate.type.TimeType@61322f9d
15:46:02.963 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.sql.Time -> org.hibernate.type.TimeType@61322f9d
15:46:02.964 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration timestamp -> org.hibernate.type.TimestampType@2362f559
15:46:02.964 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.sql.Timestamp -> org.hibernate.type.TimestampType@2362f559
15:46:02.964 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.Date -> org.hibernate.type.TimestampType@2362f559
15:46:02.965 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration dbtimestamp -> org.hibernate.type.DbTimestampType@fa4c865
15:46:02.966 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration calendar -> org.hibernate.type.CalendarType@7770f470
15:46:02.966 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.Calendar -> org.hibernate.type.CalendarType@7770f470
15:46:02.966 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.GregorianCalendar -> org.hibernate.type.CalendarType@7770f470
15:46:02.967 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration calendar_date -> org.hibernate.type.CalendarDateType@7d20d0b
15:46:02.967 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration calendar_time -> org.hibernate.type.CalendarTimeType@131ef10
15:46:02.969 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration locale -> org.hibernate.type.LocaleType@70325e14
15:46:02.969 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.Locale -> org.hibernate.type.LocaleType@70325e14
15:46:02.969 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration currency -> org.hibernate.type.CurrencyType@2002fc1d
15:46:02.969 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.Currency -> org.hibernate.type.CurrencyType@2002fc1d
15:46:02.969 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration timezone -> org.hibernate.type.TimeZoneType@7dc0f706
15:46:02.969 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.TimeZone -> org.hibernate.type.TimeZoneType@7dc0f706
15:46:02.970 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration class -> org.hibernate.type.ClassType@2de23121
15:46:02.970 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Class -> org.hibernate.type.ClassType@2de23121
15:46:02.970 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration uuid-binary -> org.hibernate.type.UUIDBinaryType@6913c1fb
15:46:02.971 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.UUID -> org.hibernate.type.UUIDBinaryType@6913c1fb
15:46:02.971 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration uuid-char -> org.hibernate.type.UUIDCharType@609cd4d8
15:46:02.972 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration binary -> org.hibernate.type.BinaryType@3c3d9b6b
15:46:02.972 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration byte[] -> org.hibernate.type.BinaryType@3c3d9b6b
15:46:02.972 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration [B -> org.hibernate.type.BinaryType@3c3d9b6b
15:46:02.972 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration wrapper-binary -> org.hibernate.type.WrapperBinaryType@7530ad9c
15:46:02.974 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration Byte[] -> org.hibernate.type.WrapperBinaryType@7530ad9c
15:46:02.974 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration [Ljava.lang.Byte; -> org.hibernate.type.WrapperBinaryType@7530ad9c
15:46:02.974 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration row_version -> org.hibernate.type.RowVersionType@5aebe890
15:46:02.974 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration image -> org.hibernate.type.ImageType@75db5df9
15:46:02.974 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration characters -> org.hibernate.type.CharArrayType@399c4be1
15:46:02.974 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration char[] -> org.hibernate.type.CharArrayType@399c4be1
15:46:02.974 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration [C -> org.hibernate.type.CharArrayType@399c4be1
15:46:02.975 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration wrapper-characters -> org.hibernate.type.CharacterArrayType@4c39bec8
15:46:02.975 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration [Ljava.lang.Character; -> org.hibernate.type.CharacterArrayType@4c39bec8
15:46:02.975 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration Character[] -> org.hibernate.type.CharacterArrayType@4c39bec8
15:46:02.975 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration text -> org.hibernate.type.TextType@1f59a598
15:46:02.976 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration ntext -> org.hibernate.type.NTextType@26b3fd41
15:46:02.977 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration blob -> org.hibernate.type.BlobType@5c671d7f
15:46:02.977 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.sql.Blob -> org.hibernate.type.BlobType@5c671d7f
15:46:02.977 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration materialized_blob -> org.hibernate.type.MaterializedBlobType@e4487af
15:46:02.978 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration clob -> org.hibernate.type.ClobType@4c309d4d
15:46:02.978 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.sql.Clob -> org.hibernate.type.ClobType@4c309d4d
15:46:02.979 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration nclob -> org.hibernate.type.NClobType@5c90e579
15:46:02.980 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.sql.NClob -> org.hibernate.type.NClobType@5c90e579
15:46:02.980 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration materialized_clob -> org.hibernate.type.MaterializedClobType@38e79ae3
15:46:02.980 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration materialized_nclob -> org.hibernate.type.MaterializedNClobType@291b4bf5
15:46:02.981 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration serializable -> org.hibernate.type.SerializableType@6db9f5a4
15:46:02.984 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration object -> org.hibernate.type.ObjectType@313b2ea6
15:46:02.984 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Object -> org.hibernate.type.ObjectType@313b2ea6
15:46:02.985 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_date -> org.hibernate.type.AdaptedImmutableType@623a8092
15:46:02.985 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_time -> org.hibernate.type.AdaptedImmutableType@a1cdc6d
15:46:02.985 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_timestamp -> org.hibernate.type.AdaptedImmutableType@175b9425
15:46:02.985 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_dbtimestamp -> org.hibernate.type.AdaptedImmutableType@3098cf3b
15:46:02.985 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_calendar -> org.hibernate.type.AdaptedImmutableType@610f7aa
15:46:02.985 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_calendar_date -> org.hibernate.type.AdaptedImmutableType@6a03bcb1
15:46:02.985 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_binary -> org.hibernate.type.AdaptedImmutableType@21b2e768
15:46:02.985 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_serializable -> org.hibernate.type.AdaptedImmutableType@57250572
15:46:02.994 [main] DEBUG org.hibernate.boot.internal.BootstrapContextImpl - Injecting ScanEnvironment [org.hibernate.jpa.boot.internal.StandardJpaScanEnvironmentImpl@55f616cf] into BootstrapContext; was [null]
15:46:02.994 [main] DEBUG org.hibernate.boot.internal.BootstrapContextImpl - Injecting ScanOptions [org.hibernate.boot.archive.scan.internal.StandardScanOptions@1356d4d4] into BootstrapContext; was [org.hibernate.boot.archive.scan.internal.StandardScanOptions@c03cf28]
15:46:03.044 [main] DEBUG org.hibernate.boot.internal.BootstrapContextImpl - Injecting JPA temp ClassLoader [null] into BootstrapContext; was [null]
15:46:03.044 [main] DEBUG org.hibernate.boot.internal.ClassLoaderAccessImpl - ClassLoaderAccessImpl#injectTempClassLoader(null) [was null]
15:46:03.054 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [uuid2] -> [org.hibernate.id.UUIDGenerator]
15:46:03.054 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [guid] -> [org.hibernate.id.GUIDGenerator]
15:46:03.055 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [uuid] -> [org.hibernate.id.UUIDHexGenerator]
15:46:03.055 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [uuid.hex] -> [org.hibernate.id.UUIDHexGenerator]
15:46:03.055 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [assigned] -> [org.hibernate.id.Assigned]
15:46:03.056 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [identity] -> [org.hibernate.id.IdentityGenerator]
15:46:03.057 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [select] -> [org.hibernate.id.SelectGenerator]
15:46:03.057 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [sequence] -> [org.hibernate.id.enhanced.SequenceStyleGenerator]
15:46:03.059 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [seqhilo] -> [org.hibernate.id.SequenceHiLoGenerator]
15:46:03.059 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [increment] -> [org.hibernate.id.IncrementGenerator]
15:46:03.059 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [foreign] -> [org.hibernate.id.ForeignGenerator]
15:46:03.059 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [sequence-identity] -> [org.hibernate.id.SequenceIdentityGenerator]
15:46:03.059 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [enhanced-sequence] -> [org.hibernate.id.enhanced.SequenceStyleGenerator]
15:46:03.060 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [enhanced-table] -> [org.hibernate.id.enhanced.TableGenerator]
15:46:03.063 [main] WARN org.hibernate.orm.connections.pooling - HHH10001002: Using Hibernate built-in connection pool (not for production use!)
15:46:03.065 [main] INFO org.hibernate.orm.connections.pooling - HHH10001005: using driver [org.h2.Driver] at URL [jdbc:h2:tcp://localhost/~/test]
15:46:03.065 [main] INFO org.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {user=sa, password=}
15:46:03.065 [main] INFO org.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
15:46:03.070 [main] DEBUG org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl - Initializing Connection pool with 1 Connections
15:46:03.070 [main] INFO org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl - HHH000115: Hibernate connection pool size: 20 (min=1)
15:46:03.122 [main] DEBUG org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator - Database ->
name : H2
version : 1.4.199 (2019-03-13)
major : 1
minor : 4
15:46:03.122 [main] DEBUG org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator - Driver ->
name : H2 JDBC Driver
version : 1.4.199 (2019-03-13)
major : 1
minor : 4
15:46:03.122 [main] DEBUG org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator - JDBC version : 4.1
15:46:03.134 [main] INFO org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
15:46:03.175 [main] DEBUG org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder - JDBC driver metadata reported database stores quoted identifiers in neither upper, lower nor mixed case
15:46:03.181 [main] DEBUG org.hibernate.engine.jdbc.env.internal.DefaultSchemaNameResolver - Unable to use Java 1.7 Connection#getSchema : An error occurred trying to resolve the connection default schema resolver: Feature not supported: "getSchema && remote session" [50100-199]
15:46:03.184 [main] DEBUG org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl - Unable to resolve connection default schema
org.hibernate.HibernateException: Use of DefaultSchemaNameResolver requires Dialect to provide the proper SQL statement/command but provided Dialect [org.hibernate.dialect.H2Dialect] did not return anything from Dialect#getCurrentSchemaCommand
at org.hibernate.engine.jdbc.env.internal.DefaultSchemaNameResolver$SchemaNameResolverFallbackDelegate.resolveSchemaName(DefaultSchemaNameResolver.java:100)
at org.hibernate.engine.jdbc.env.internal.DefaultSchemaNameResolver.resolveSchemaName(DefaultSchemaNameResolver.java:76)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.determineCurrentSchemaName(JdbcEnvironmentImpl.java:315)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.<init>(JdbcEnvironmentImpl.java:273)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:114)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:272)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:246)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:223)
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:175)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:295)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:252)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:223)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:173)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:127)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1460)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1494)
at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:56)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:80)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
at inflearn.exjpa.JpaMain.main(JpaMain.java:11)
15:46:03.200 [main] DEBUG org.hibernate.type.spi.TypeConfiguration$Scope - Scoping TypeConfiguration [org.hibernate.type.spi.TypeConfiguration@50029372] to MetadataBuildingContext [org.hibernate.boot.internal.MetadataBuildingContextRootImpl@e3b3b2f]
15:46:03.241 [main] DEBUG org.hibernate.boot.model.relational.Namespace - Created database namespace [logicalName=Name{catalog=null, schema=null}, physicalName=Name{catalog=null, schema=null}]
15:46:03.290 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: inflearn.exjpa.Member
15:46:03.311 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column: Ejb3DiscriminatorColumn{logicalColumnName'DTYPE', discriminatorTypeName='string'}
15:46:03.317 [main] DEBUG org.hibernate.cfg.annotations.EntityBinder - Import with entity name Member
15:46:03.323 [main] DEBUG org.hibernate.cfg.annotations.EntityBinder - Bind entity inflearn.exjpa.Member on table Member
15:46:03.350 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column: Ejb3Column{table=org.hibernate.mapping.Table(Member), mappingColumn=id, insertable=true, updatable=true, unique=false}
15:46:03.352 [main] DEBUG org.hibernate.boot.internal.ClassLoaderAccessImpl - Not known whether passed class name [inflearn.exjpa.Member] is safe
15:46:03.352 [main] DEBUG org.hibernate.boot.internal.ClassLoaderAccessImpl - No temp ClassLoader provided; using live ClassLoader for loading potentially unsafe class : inflearn.exjpa.Member
15:46:03.353 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - MetadataSourceProcessor property id with lazy=false
15:46:03.355 [main] DEBUG org.hibernate.cfg.AbstractPropertyHolder - Attempting to locate auto-apply AttributeConverter for property [inflearn.exjpa.Member:id]
15:46:03.358 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for id
15:46:03.360 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property id
15:46:03.364 [main] DEBUG org.hibernate.cfg.BinderHelper - #makeIdGenerator(org.hibernate.mapping.SimpleValue([org.hibernate.mapping.Column(id)]), id, org.hibernate.id.enhanced.TableGenerator, MEMBER_SEQ_GENERATOR, ...)
15:46:03.366 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column: Ejb3Column{table=org.hibernate.mapping.Table(Member), mappingColumn=name, insertable=true, updatable=true, unique=false}
15:46:03.367 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - MetadataSourceProcessor property username with lazy=false
15:46:03.367 [main] DEBUG org.hibernate.cfg.AbstractPropertyHolder - Attempting to locate auto-apply AttributeConverter for property [inflearn.exjpa.Member:username]
15:46:03.367 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for username
15:46:03.367 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property username
15:46:03.388 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - Starting fillSimpleValue for id
15:46:03.388 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - Starting fillSimpleValue for username
15:46:03.393 [main] DEBUG org.hibernate.mapping.PrimaryKey - Forcing column [id] to be non-null as it is part of the primary key for table [member]
15:46:03.410 [main] DEBUG org.hibernate.mapping.PrimaryKey - Forcing column [sequence_name] to be non-null as it is part of the primary key for table [my_sequences]
15:46:03.459 [main] DEBUG org.hibernate.internal.SessionFactoryImpl - Building session factory
15:46:03.461 [main] DEBUG org.hibernate.cfg.Settings - SessionFactory name : null
15:46:03.461 [main] DEBUG org.hibernate.cfg.Settings - Automatic flush during beforeCompletion(): enabled
15:46:03.461 [main] DEBUG org.hibernate.cfg.Settings - Automatic session close at end of transaction: disabled
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Statistics: disabled
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Deleted entity synthetic identifier rollback: disabled
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Default entity-mode: pojo
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Check Nullability in Core (should be disabled when Bean Validation is on): enabled
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Allow initialization of lazy state outside session : disabled
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Using BatchFetchStyle : LEGACY
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Default batch fetch size: -1
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Maximum outer join fetch depth: null
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Default null ordering: NONE
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Order SQL updates by primary key: disabled
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Order SQL inserts for batching: disabled
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - multi-tenancy strategy : NONE
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - JTA Track by Thread: enabled
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Query language substitutions: {}
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Named query checking : enabled
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Second-level cache: disabled
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Second-level query cache: disabled
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Second-level query cache factory: null
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Second-level cache region prefix: null
15:46:03.462 [main] DEBUG org.hibernate.cfg.Settings - Optimize second-level cache for minimal puts: disabled
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - Structured second-level cache entries: disabled
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - Second-level cache direct-reference entries: disabled
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - Automatic eviction of collection cache: disabled
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - JDBC batch size: 15
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - JDBC batch updates for versioned data: enabled
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - Scrollable result sets: enabled
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - Wrap result sets: disabled
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - JDBC3 getGeneratedKeys(): enabled
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - JDBC result set fetch size: null
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - Connection release mode: AFTER_TRANSACTION
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - Generate SQL with comments: enabled
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - JPA compliance - query : disabled
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - JPA compliance - closed-handling : disabled
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - JPA compliance - lists : disabled
15:46:03.463 [main] DEBUG org.hibernate.cfg.Settings - JPA compliance - transactions : disabled
15:46:03.514 [main] DEBUG org.hibernate.service.internal.SessionFactoryServiceRegistryImpl - EventListenerRegistry access via ServiceRegistry is deprecated. Use `sessionFactory.getEventEngine().getListenerRegistry()` instead
15:46:03.514 [main] DEBUG org.hibernate.service.internal.SessionFactoryServiceRegistryImpl - EventListenerRegistry access via ServiceRegistry is deprecated. Use `sessionFactory.getEventEngine().getListenerRegistry()` instead
15:46:03.525 [main] DEBUG org.hibernate.internal.SessionFactoryImpl - Session factory constructed with filter configurations : {}
15:46:03.525 [main] DEBUG org.hibernate.internal.SessionFactoryImpl - Instantiating session factory with properties: {sun.desktop=windows, awt.toolkit=sun.awt.windows.WToolkit, hibernate.format_sql=true, java.specification.version=1.8, file.encoding.pkg=sun.io, sun.cpu.isalist=amd64, sun.jnu.encoding=MS949, hibernate.dialect=org.hibernate.dialect.H2Dialect, java.class.path=C:\Program Files\Zulu\zulu-8\jre\lib\cat.jar;C:\Program Files\Zulu\zulu-8\jre\lib\charsets.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\cldrdata.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\crs-agent.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\dnsns.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\jaccess.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\legacy8ujsse.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\localedata.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\nashorn.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\openjsse.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\sunec.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\sunmscapi.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Zulu\zulu-8\jre\lib\ext\zipfs.jar;C:\Program Files\Zulu\zulu-8\jre\lib\jce.jar;C:\Program Files\Zulu\zulu-8\jre\lib\jfr.jar;C:\Program Files\Zulu\zulu-8\jre\lib\jsse.jar;C:\Program Files\Zulu\zulu-8\jre\lib\management-agent.jar;C:\Program Files\Zulu\zulu-8\jre\lib\resources.jar;C:\Program Files\Zulu\zulu-8\jre\lib\rt.jar;C:\Mega_Spring\inf\exjpa\target\classes;C:\Users\eui44\.m2\repository\com\h2database\h2\1.4.199\h2-1.4.199.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot-starter\2.7.14\spring-boot-starter-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot\2.7.14\spring-boot-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-context\5.3.29\spring-context-5.3.29.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-expression\5.3.29\spring-expression-5.3.29.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.7.14\spring-boot-autoconfigure-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.7.14\spring-boot-starter-logging-2.7.14.jar;C:\Users\eui44\.m2\repository\ch\qos\logback\logback-classic\1.2.12\logback-classic-1.2.12.jar;C:\Users\eui44\.m2\repository\ch\qos\logback\logback-core\1.2.12\logback-core-1.2.12.jar;C:\Users\eui44\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.17.2\log4j-to-slf4j-2.17.2.jar;C:\Users\eui44\.m2\repository\org\apache\logging\log4j\log4j-api\2.17.2\log4j-api-2.17.2.jar;C:\Users\eui44\.m2\repository\org\slf4j\jul-to-slf4j\1.7.36\jul-to-slf4j-1.7.36.jar;C:\Users\eui44\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-core\5.3.29\spring-core-5.3.29.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-jcl\5.3.29\spring-jcl-5.3.29.jar;C:\Users\eui44\.m2\repository\org\yaml\snakeyaml\1.30\snakeyaml-1.30.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\2.7.14\spring-boot-starter-data-jpa-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot-starter-aop\2.7.14\spring-boot-starter-aop-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-aop\5.3.29\spring-aop-5.3.29.jar;C:\Users\eui44\.m2\repository\org\aspectj\aspectjweaver\1.9.7\aspectjweaver-1.9.7.jar;C:\Users\eui44\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\2.7.14\spring-boot-starter-jdbc-2.7.14.jar;C:\Users\eui44\.m2\repository\com\zaxxer\HikariCP\4.0.3\HikariCP-4.0.3.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-jdbc\5.3.29\spring-jdbc-5.3.29.jar;C:\Users\eui44\.m2\repository\jakarta\transaction\jakarta.transaction-api\1.3.3\jakarta.transaction-api-1.3.3.jar;C:\Users\eui44\.m2\repository\jakarta\persistence\jakarta.persistence-api\2.2.3\jakarta.persistence-api-2.2.3.jar;C:\Users\eui44\.m2\repository\org\hibernate\hibernate-core\5.6.15.Final\hibernate-core-5.6.15.Final.jar;C:\Users\eui44\.m2\repository\org\jboss\logging\jboss-logging\3.4.3.Final\jboss-logging-3.4.3.Final.jar;C:\Users\eui44\.m2\repository\net\bytebuddy\byte-buddy\1.12.23\byte-buddy-1.12.23.jar;C:\Users\eui44\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\eui44\.m2\repository\org\jboss\jandex\2.4.2.Final\jandex-2.4.2.Final.jar;C:\Users\eui44\.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;C:\Users\eui44\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.1.2.Final\hibernate-commons-annotations-5.1.2.Final.jar;C:\Users\eui44\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.8\jaxb-runtime-2.3.8.jar;C:\Users\eui44\.m2\repository\org\glassfish\jaxb\txw2\2.3.8\txw2-2.3.8.jar;C:\Users\eui44\.m2\repository\com\sun\istack\istack-commons-runtime\3.0.12\istack-commons-runtime-3.0.12.jar;C:\Users\eui44\.m2\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;C:\Users\eui44\.m2\repository\org\springframework\data\spring-data-jpa\2.7.14\spring-data-jpa-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\data\spring-data-commons\2.7.14\spring-data-commons-2.7.14.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-orm\5.3.29\spring-orm-5.3.29.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-tx\5.3.29\spring-tx-5.3.29.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-beans\5.3.29\spring-beans-5.3.29.jar;C:\Users\eui44\.m2\repository\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;C:\Users\eui44\.m2\repository\org\springframework\spring-aspects\5.3.29\spring-aspects-5.3.29.jar;C:\Users\eui44\.m2\repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.3\jakarta.xml.bind-api-2.3.3.jar;C:\Users\eui44\.m2\repository\jakarta\activation\jakarta.activation-api\1.2.2\jakarta.activation-api-1.2.2.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\lib\idea_rt.jar, java.vm.vendor=Azul Systems, Inc., sun.arch.data.model=64, user.variant=, java.vendor.url=http://www.azul.com/, user.timezone=Asia/Seoul, javax.persistence.jdbc.user=****, javax.persistence.jdbc.url=jdbc:h2:tcp://localhost/~/test, os.name=Windows 10, java.vm.specification.version=1.8, jakarta.persistence.jdbc.password=****, user.country=KR, sun.java.launcher=SUN_STANDARD, local.setting.IS_JTA_TXN_COORD=false, sun.boot.library.path=C:\Program Files\Zulu\zulu-8\jre\bin, sun.java.command=inflearn.exjpa.JpaMain, hibernate.use_sql_comments=true, jakarta.persistence.jdbc.driver=org.h2.Driver, sun.cpu.endian=little, user.home=C:\Users\eui44, user.language=ko, java.specification.vendor=Oracle Corporation, java.home=C:\Program Files\Zulu\zulu-8\jre, file.separator=\, jakarta.persistence.jdbc.user=****, line.separator=
, hibernate.persistenceUnitName=hello, jdk.vendor.version=Zulu 8.66.0.15-CA-win64, java.vm.specification.vendor=Oracle Corporation, java.specification.name=Java Platform API Specification, hibernate.transaction.coordinator_class=class org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorBuilderImpl, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, javax.persistence.jdbc.driver=org.h2.Driver, sun.boot.class.path=C:\Program Files\Zulu\zulu-8\jre\lib\resources.jar;C:\Program Files\Zulu\zulu-8\jre\lib\rt.jar;C:\Program Files\Zulu\zulu-8\jre\lib\sunrsasign.jar;C:\Program Files\Zulu\zulu-8\jre\lib\jsse.jar;C:\Program Files\Zulu\zulu-8\jre\lib\jce.jar;C:\Program Files\Zulu\zulu-8\jre\lib\charsets.jar;C:\Program Files\Zulu\zulu-8\jre\lib\jfr.jar;C:\Program Files\Zulu\zulu-8\jre\lib\cat.jar;C:\Program Files\Zulu\zulu-8\jre\classes, hibernate.hbm2ddl.auto=create, user.script=, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, java.runtime.version=1.8.0_352-b08, user.name=eui44, path.separator=;, hibernate.connection.username=****, os.version=10.0, java.endorsed.dirs=C:\Program Files\Zulu\zulu-8\jre\lib\endorsed, java.runtime.name=OpenJDK Runtime Environment, hibernate.connection.url=jdbc:h2:tcp://localhost/~/test, file.encoding=UTF-8, hibernate.ejb.persistenceUnitName=hello, java.vm.name=OpenJDK 64-Bit Server VM, hibernate.show_sql=true, hibernate.connection.driver_class=org.h2.Driver, java.vendor.url.bug=http://www.azul.com/support/, java.io.tmpdir=C:\Users\eui44\AppData\Local\Temp\, java.version=1.8.0_352, user.dir=C:\Mega_Spring\inf\exjpa, os.arch=amd64, java.vm.specification.name=Java Virtual Machine Specification, java.awt.printerjob=sun.awt.windows.WPrinterJob, hibernate.connection.password=****, sun.os.patch.level=, jakarta.persistence.jdbc.url=jdbc:h2:tcp://localhost/~/test, hibernate.boot.CfgXmlAccessService.key=org.hibernate.boot.registry.StandardServiceRegistryBuilder$1@6b53bcc2, java.library.path=C:\Program Files\Zulu\zulu-8\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Zulu\zulu-8\bin\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\Git\cmd;";C:\Program Files\Zulu\zulu-8\bin";C:\Program Files\Docker\Docker\resources\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\PuTTY\;C:\OpenSSL\bin;C:\Users\eui44\AppData\Local\Programs\Python\Python311\Scripts\;C:\Users\eui44\AppData\Local\Programs\Python\Python311\;C:\Users\eui44\AppData\Local\Microsoft\WindowsApps;C:\Users\eui44\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\bin;C:\Users\eui44\AppData\Local\gitkraken\bin;C:\Users\eui44\AppData\Local\Microsoft\WindowsApps;C:\Users\eui44\AppData\Roaming\npm;., java.vendor=Azul Systems, Inc., java.vm.info=mixed mode, java.vm.version=25.352-b08, java.specification.maintenance.version=4, hibernate.bytecode.use_reflection_optimizer=false, sun.io.unicode.encoding=UnicodeLittle, java.ext.dirs=C:\Program Files\Zulu\zulu-8\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, javax.persistence.jdbc.password=****, java.class.version=52.0}
15:46:03.536 [main] DEBUG org.hibernate.secure.spi.JaccIntegrator - Skipping JACC integration as it was not enabled
15:46:03.538 [main] DEBUG org.hibernate.internal.SessionFactoryImpl - Instantiated session factory
15:46:03.538 [main] DEBUG org.hibernate.type.spi.TypeConfiguration$Scope - Scoping TypeConfiguration [org.hibernate.type.spi.TypeConfiguration@50029372] to SessionFactoryImpl [org.hibernate.internal.SessionFactoryImpl@c055c54]
15:46:03.584 [main] DEBUG org.hibernate.boot.internal.ClassLoaderAccessImpl - Not known whether passed class name [inflearn.exjpa.Member] is safe
15:46:03.584 [main] DEBUG org.hibernate.boot.internal.ClassLoaderAccessImpl - No temp ClassLoader provided; using live ClassLoader for loading potentially unsafe class : inflearn.exjpa.Member
15:46:03.762 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Static SQL for entity: inflearn.exjpa.Member
15:46:03.763 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Version select: /* get version inflearn.exjpa.Member */ select id from Member where id =?
15:46:03.763 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Snapshot select: /* get current state inflearn.exjpa.Member */ select member_.id, member_.name as name2_0_ from Member member_ where member_.id=?
15:46:03.763 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Insert 0: /* insert inflearn.exjpa.Member */ insert into Member (name, id) values (?, ?)
15:46:03.763 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Update 0: /* update inflearn.exjpa.Member */ update Member set name=? where id=?
15:46:03.763 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Delete 0: /* delete inflearn.exjpa.Member */ delete from Member where id=?
15:46:03.790 [main] DEBUG org.hibernate.loader.plan.build.internal.spaces.QuerySpacesImpl - Adding QuerySpace : uid = <gen:0> -> org.hibernate.loader.plan.build.internal.spaces.EntityQuerySpaceImpl@2db2cd5]
15:46:03.791 [main] DEBUG org.hibernate.persister.walking.spi.MetamodelGraphWalker - Visiting attribute path : username
15:46:03.791 [main] DEBUG org.hibernate.loader.plan.build.internal.FetchStyleLoadPlanBuildingAssociationVisitationStrategy - Building LoadPlan...
15:46:03.800 [main] DEBUG org.hibernate.loader.plan.exec.internal.LoadQueryJoinAndFetchProcessor - processing queryspace <gen:0>
15:46:03.805 [main] DEBUG org.hibernate.loader.plan.build.spi.LoadPlanTreePrinter - LoadPlan(entity=inflearn.exjpa.Member)
- Returns
- EntityReturnImpl(entity=inflearn.exjpa.Member, querySpaceUid=<gen:0>, path=inflearn.exjpa.Member)
- QuerySpaces
- EntityQuerySpaceImpl(uid=<gen:0>, entity=inflearn.exjpa.Member)
- SQL table alias mapping - member0_
- alias suffix - 0_
- suffixed key columns - {id1_0_0_}
15:46:03.807 [main] DEBUG org.hibernate.loader.entity.plan.EntityLoader - Static select for entity inflearn.exjpa.Member [NONE]: select member0_.id as id1_0_0_, member0_.name as name2_0_0_ from Member member0_ where member0_.id=?
15:46:03.848 [main] DEBUG org.hibernate.SQL -
drop table if exists Member CASCADE
Hibernate:
drop table if exists Member CASCADE
15:46:03.850 [main] INFO org.hibernate.orm.connections.access - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@1c05a54d] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
15:46:03.852 [main] DEBUG org.hibernate.SQL -
drop table if exists MY_SEQUENCES CASCADE
Hibernate:
drop table if exists MY_SEQUENCES CASCADE
15:46:03.855 [main] DEBUG org.hibernate.SQL -
create table Member (
id bigint not null,
name varchar(255) not null,
primary key (id)
)
Hibernate:
create table Member (
id bigint not null,
name varchar(255) not null,
primary key (id)
)
15:46:03.855 [main] INFO org.hibernate.orm.connections.access - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@79c4715d] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
15:46:03.856 [main] DEBUG org.hibernate.SQL -
create table MY_SEQUENCES (
sequence_name varchar(255) not null,
next_val bigint,
primary key (sequence_name)
)
Hibernate:
create table MY_SEQUENCES (
sequence_name varchar(255) not null,
next_val bigint,
primary key (sequence_name)
)
15:46:03.858 [main] DEBUG org.hibernate.SQL -
insert into MY_SEQUENCES(sequence_name, next_val) values ('MEMBER_SEQ',0)
Hibernate:
insert into MY_SEQUENCES(sequence_name, next_val) values ('MEMBER_SEQ',0)
15:46:03.861 [main] DEBUG org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator - No JtaPlatform was specified, checking resolver
15:46:03.861 [main] DEBUG org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformResolverInitiator - No JtaPlatformResolver was specified, using default [org.hibernate.engine.transaction.jta.platform.internal.StandardJtaPlatformResolver]
15:46:03.865 [main] DEBUG org.hibernate.engine.transaction.jta.platform.internal.StandardJtaPlatformResolver - Could not resolve JtaPlatform, using default [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
15:46:03.865 [main] INFO org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
15:46:03.871 [main] DEBUG org.hibernate.service.internal.SessionFactoryServiceRegistryImpl - EventListenerRegistry access via ServiceRegistry is deprecated. Use `sessionFactory.getEventEngine().getListenerRegistry()` instead
15:46:03.872 [main] DEBUG org.hibernate.hql.internal.QueryTranslatorFactoryInitiator - QueryTranslatorFactory: org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory@46292372
15:46:03.875 [main] DEBUG org.hibernate.query.spi.NamedQueryRepository - Checking 0 named HQL queries
15:46:03.875 [main] DEBUG org.hibernate.query.spi.NamedQueryRepository - Checking 0 named SQL queries
15:46:03.877 [main] DEBUG org.hibernate.internal.SessionFactoryRegistry - Initializing SessionFactoryRegistry : org.hibernate.internal.SessionFactoryRegistry@38d5b107
15:46:03.878 [main] DEBUG org.hibernate.internal.SessionFactoryRegistry - Registering SessionFactory: 51025ca3-cc72-4acb-afac-37dc88314104 (<unnamed>)
15:46:03.879 [main] DEBUG org.hibernate.internal.SessionFactoryRegistry - Not binding SessionFactory to JNDI, no JNDI name configured
15:46:03.949 [main] DEBUG org.hibernate.stat.internal.StatisticsInitiator - Statistics initialized [enabled=false]
15:46:03.957 [main] DEBUG org.hibernate.engine.transaction.internal.TransactionImpl - On TransactionImpl creation, JpaCompliance#isJpaTransactionComplianceEnabled == false
15:46:03.957 [main] DEBUG org.hibernate.engine.transaction.internal.TransactionImpl - begin
15:46:03.973 [main] DEBUG org.hibernate.SQL -
select
tbl.next_val
from
MY_SEQUENCES tbl
where
tbl.sequence_name=? for update
Hibernate:
select
tbl.next_val
from
MY_SEQUENCES tbl
where
tbl.sequence_name=? for update
15:46:03.975 [main] DEBUG org.hibernate.SQL -
update
MY_SEQUENCES
set
next_val=?
where
next_val=?
and sequence_name=?
Hibernate:
update
MY_SEQUENCES
set
next_val=?
where
next_val=?
and sequence_name=?
15:46:03.982 [main] DEBUG org.hibernate.event.internal.AbstractSaveEventListener - Generated identifier: 1, using strategy: org.hibernate.id.enhanced.TableGenerator
15:46:03.999 [main] DEBUG org.hibernate.engine.transaction.internal.TransactionImpl - committing
15:46:04.000 [main] DEBUG org.hibernate.event.internal.AbstractFlushingEventListener - Processing flush-time cascades
15:46:04.001 [main] DEBUG org.hibernate.event.internal.AbstractFlushingEventListener - Dirty checking collections
15:46:04.006 [main] DEBUG org.hibernate.event.internal.AbstractFlushingEventListener - Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
15:46:04.006 [main] DEBUG org.hibernate.event.internal.AbstractFlushingEventListener - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
15:46:04.007 [main] DEBUG org.hibernate.internal.util.EntityPrinter - Listing entities:
15:46:04.007 [main] DEBUG org.hibernate.internal.util.EntityPrinter - inflearn.exjpa.Member{id=1, username=A}
15:46:04.016 [main] DEBUG org.hibernate.SQL -
/* insert inflearn.exjpa.Member
*/ insert
into
Member
(name, id)
values
(?, ?)
Hibernate:
/* insert inflearn.exjpa.Member
*/ insert
into
Member
(name, id)
values
(?, ?)
15:46:04.024 [main] DEBUG org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl - Initiating JDBC connection release from afterTransaction
15:46:04.025 [main] DEBUG org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl - Initiating JDBC connection release from afterTransaction
15:46:04.025 [main] DEBUG org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl - HHH000420: Closing un-released batch
15:46:04.025 [main] DEBUG org.hibernate.internal.SessionFactoryImpl - HHH000031: Closing
15:46:04.025 [main] DEBUG org.hibernate.type.spi.TypeConfiguration$Scope - Un-scoping TypeConfiguration [org.hibernate.type.spi.TypeConfiguration$Scope@602c4656] from SessionFactory [org.hibernate.internal.SessionFactoryImpl@c055c54]
15:46:04.026 [main] DEBUG org.hibernate.service.internal.AbstractServiceRegistryImpl - Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries
15:46:04.026 [main] INFO org.hibernate.orm.connections.pooling - HHH10001008: Cleaning up connection pool [jdbc:h2:tcp://localhost/~/test]
15:46:04.027 [main] DEBUG org.hibernate.boot.registry.internal.BootstrapServiceRegistryImpl - Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries
전체적으로 이렇게 나오고
운영에서는 테이블 전략을 쓰기가 부담스러움
그래서 잘 쓰지 않음.
권장하는 식별자 전략
대체키 : AUTO_INCREMENT나 SEQUENCE 둘 중 하나 쓰고
때에 따라서 회사의 룰 등을 따라 조건을 맞추자
'Spring > JPA 공부' 카테고리의 다른 글
실전 예제 1 - 요구사항 분석과 기본 매핑 (0) | 2023.08.17 |
---|---|
<보충설명> 기본키 매핑 (0) | 2023.08.16 |
엔티티 매핑 3 - 필드와 컬럼 매핑 (0) | 2023.08.15 |
엔티티 매핑 2 - 데이터베이스 스키마 자동 생성 (0) | 2023.08.15 |
엔티티 매핑 1 - 객체와 테이블 매핑 (0) | 2023.08.15 |