쿼리가 N+1이 아니라 딱 테이블 수만큼 맞출수가 있다.
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
<persistence-unit name="hello">
<properties>
<!-- 필수 속성 -->
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
<property name="javax.persistence.jdbc.user" value="sa"/>
<property name="javax.persistence.jdbc.password" value=""/>
<property name="javax.persistence.jdbc.url" value="jdbc:h2:tcp://localhost/~/test"/>
<property name="hibernate.dialect" value="dialect.MyH2Dialect"/>
<!-- 옵션 -->
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.use_sql_comments" value="true"/>
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.default_batch_fetch_size" value="100"/>
</properties>
</persistence-unit>
</persistence>
'Developer' 카테고리의 다른 글
[JPA]쿼리에 Entity 직접 사용하기 (0) | 2020.09.22 |
---|---|
[JPA]다형성 JPQL 쿼리 (0) | 2020.09.22 |
[JPA]BatchSize - LAZY로딩 시 몇개를 가져올거냐? (0) | 2020.09.22 |
[JAP]fetch 조인 - 특징과 한계 (0) | 2020.09.22 |
[JPA]JPQL - distinct 중복제거 (0) | 2020.09.22 |