JPA
Covenant
Chapter 5
JPA
JPQL Join Fetch
- Name. Covenant Ko
- Company. 11번가
- Github 용감한친구들 Organization Founder & Maintainer. https://github.com/brave-people
- Github. https://github.com/KoEonYack
- Tech Blog. https://covenant.tistory.com/ (누적 방문 51만)
(Cartesian Product)
JPQL Fetch Join ?
https://www.mathstopia.net/sets/cartesian-product
A×B = { (a,b) | aϵA and bϵB }
Cartesian Product is the multiplication of two sets to
form the set of all ordered pairs.
(Cartesian Product)
JPQL Fetch Join ?
1
1
1 *
1
*
1
1
1 *
1
*
1
1
1 *
1
*
1
1
1 *
1
*
Order Member Delivery
1
1
1 *
1
*
Order Member Delivery
?
1
1
1 *
1
*
Order Member Delivery
?
.
1
* 1
1
1
* *
1
1
* 1
1
1
* *
1
DB Order 2 OrderItem 2 ?
OrderA
OrderA
OrderB
OrderB
OrderItemA
OrderItemB
OrderItemA
OrderItemB
Distinct
1. SQL distinct row .
2. JPQL distinct Root Entity
Distinct
1. SQL distinct row .
2. JPQL distinct Root Entity
? No
Distinct
1. SQL distinct row .
2. JPQL distinct Root Entity
?
Distinct
1. SQL distinct row .
2. JPQL distinct Root Entity
? No
Distinct
1. SQL distinct row .
2. JPQL distinct Root Entity
? No
?
https://velog.io/@neity16/
?
https://velog.io/@neity16/
DB JPQL DISTINCT
1. ToOne(OneToOne, ManyToOne)
2.
3. hibernate default_batch_fetch_size or @BatchSize
JPA
Covenant
Chapter 5
JPA
JPQL Join Fetch

JPA Week5. Join Fetch