- "I use JPA because it's convenient as an ORM."
- I know that using save() performs a save.
- I'm not really sure about the persistence context.
[Lv2] JPA Mastery for Working Developers - From Persistence Context to Practical Patterns
You've probably written SQL using JdbcTemplate before, right? Everyone has likely had that experience of sighing while having to fix both the SQL and the RowMapper every time a single column changes. This course starts from that very pain. Doing a single SELECT with pure JDBC takes 35 lines. You open a Connection, create a PreparedStatement, iterate through the ResultSet, and if you miss a single close(), the server crashes. After typing through this hell yourself, when you finally encounter a single line of JPA's save(), you'll feel "this is why we use JPA" not just in your head, but in your hands.
116 learners
Level Basic
Course period Unlimited


Reviews from Early Learners
5.0
5.0
Bruce Han
Great things about this course - It teaches JPA very well with a focus on practical application. - Theories are explained through analogies, which helped me understand them quickly. Points to note when taking the course - You won't remember much if you just listen. That's why I think it's important to listen to one lecture, type along with the materials, and ensure you understand before moving on. Areas for improvement - There are occasional typos in the videos. For example, "polymorphism" is written as "diversity," and there are cases where words like "builder.and" are incorrectly displayed as "builder.end" in the subtitles.
5.0
안승현
I am enjoying the lectures. Subjectively speaking, this is the easiest course to understand.
5.0
부분적무료화
It explains JPA very easily and provides a clear explanation of the paradigm mismatch between objects and database tables along with relevant examples. Rather than just listing various JPA features, it recommends specific features to use and those to avoid, providing practical advice on how they are typically used in real-world development. For those already familiar with JPA in a professional setting, it serves as a great refresher course; for those using it for the first time or considering its adoption, it can be used as a guidebook to build services without much difficulty.
What you will gain after the course
The ability to fluently explain first-level cache, dirty checking, and transactional write-behind based on hands-on experience.
The experience of realizing why JPA is necessary after personally suffering through 35 lines of JDBC code.
Practical debugging skills to identify the cause of N+1 problems by analyzing logs and selecting the appropriate solution among Fetch Join, @EntityGraph, or @BatchSize based on the situation.
The ability to design clean dynamic queries without "if-statement spaghetti" using QueryDSL's BooleanExpression, and to integrate JPA and QueryDSL into a production-standard structure using the Custom Repository pattern.
From entity design to inheritance relationship mapping, BaseEntity (Auditing), and embedded types — the design intuition to decide "Let's go with this pattern" rather than asking "How should I design the table?" when starting a real-world project.
You can use save(), but if you can't explain
'why', you will fail.
For those who have performed CRUD with JdbcTemplate but get stuck when asked, "What is the persistence context?" Through the “Suffering → Salvation” learning method—where you first experience the pain of 35 lines of pure JDBC before realizing the greatness of JPA—you will become a developer who can explain even the internal workings.
Most JPA courses only teach you 'how'.
"Just add @Entity and use save()." If you follow that, it works. But interviewers will ask, "What is the operating principle of the persistence context?" or "How did you resolve the N+1 problem?"
They stop at "Just add @Entity and use save()."
They cannot explain the principles of the persistence context, N+1, and dirty checking.
Without the pain of writing 35 lines of JDBC code, you won't appreciate the value of JPA.
Core concepts, explained so you'll never forget them once you've heard them.
Persistence Context, Write-Behind, Lazy Loading, Dynamic Queries, N+1, Relationships — I will show you not just the code, but the "what and why" through metaphors.
"What is a persistence context?"
It is explained as a secretary who works through first-level caching and change detection.
"When is the INSERT executed?"
Answer that it sends them all at once, just like batching deliveries.
"How does lazy loading work?"
It explains that the fake employee (proxy) loads when real work arises.
"How did you write the dynamic queries?"
Assemble QueryDSL like Lego safely at compile time.
"How did you solve the N+1 problem?"
Answer with three methods, including Fetch Join.
"Why did you design @ManyToOne that way?"
It explains that the object-table mismatch is resolved through mapping.
You have to experience it firsthand for it to be etched into your bones.
You shouldn't learn save() first. Every week, you will personally experience the journey from "pain to salvation." After enduring the 35-line hell and N+1 explosions, the principles will flow naturally during interviews.
I wrote 35 lines of code for a single SELECT statement using JDBC.
After that pain, I experience the revolution of 3 lines of persistence context.
Data has been corrupted due to missing EnumType and the use of merge().
EnumType.STRING and change detection provide a safe defense.
11 queries were executed to retrieve 10 members.
I experienced reducing it to just one line with a Fetch Join.
I copy-pasted createdAt into every entity.
BaseEntity in one go to inherit common fields.
A JPQL string typo caused a runtime failure.
QueryDSL catches it at compile time.
The same questions and answers determine whether you pass or fail.
- "After trying it myself with JDBC, the mismatch between objects and tables was difficult."
- "I found that the persistence context's first-level cache and dirty checking solved this."
- I answer the N+1 problem with three methods, including Fetch Join.
I can handle CRUD, but I get stuck again during interviews.
I created CRUD with JdbcTemplate. However, the common pattern of failure begins again.
This course is the core of the roadmap, Lv.2.
If you have solidified your Spring Boot foundations in Lv.1, it is now time to master JPA, the most widely used tool in practical application.
Build a solid foundation before starting Spring.
Build APIs with Spring and prepare for interviews.
From Persistence Context to QueryDSL.
Once you have equipped yourself with practical weapons, it's time to differentiate your resume and pass the screening process.
Has this ever happened to you?
Have you ever been speechless when asked to "explain the persistence context"?
"Have you ever solved the N+1 problem?" and only being able to give one answer?
5 weeks, 41 lectures · From Persistence Context to QueryDSL.
Persistence Context → Entity Mapping → Relationships/Proxies → Inheritance/Value Types → QueryDSL. Experience every concept through the journey of "Pain → Salvation." Click on a section to view the detailed table of contents.
섹션 1. 🦸 1주차 · 영속성 컨텍스트, JDBC 고통 → 구원영속성 컨텍스트
- 1😱 The Pain of Pure JDBC: 35 Lines for a Single SELECT
- 2🦸 Persistence Context: The Savior Who Ended the Pain
- 3📦 First-Level Cache: The Secret to Minimizing DB Access
- 4🔍 Dirty Checking: I know what you changed
- 5📮 Transactional Write-Behind: Batching for a Single Shot
섹션 2. 🏷️ 2주차 · 엔티티 매핑과 Spring Data JPA엔티티 매핑
- 6🏷️ Complete Understanding of @Entity, @Table, and @Column
- 7🔑 Primary Key Mapping Strategies
- 8🚽 Flush: The moment the water goes down
- 9👻 Detached State: When the Secretary Goes Home
- 10🎁 Spring Data JPA + The Pitfalls of save() and merge()
섹션 3. 🌍 3주차 · 연관관계와 프록시·지연 로딩연관관계·프록시
- 11🌍 Object World vs. Table World
- 12↔️ Unidirectional/Bidirectional Mapping and the Rule of the Owner
- 13⚡ Eager Loading vs. Lazy Loading: Why is LAZY the default?
- 14🎭 Proxy: The fake object that enables lazy loading
- 15👨👦 CASCADE & Orphan Removal
섹션 4. 🧬 4주차 · 상속 매핑과 값 타입상속·값 타입
- 16🧬 Inheritance Mapping: Joined vs. Single Table Strategy
- 17📋 @MappedSuperclass: Common fields with BaseEntity
- 18💳 Practice: Payment Domain Inheritance + AttributeConverter
- 19🎁 Value Types: Embedded and Immutable Objects
- 20📚 Limitations and Alternatives of Value Type Collections
섹션 5. 🏗️ 5주차 · QueryDSL 실무QueryDSL
- 21🏗️ Project Environment Setup and the Secret of Q-Classes
- 22🔎 Basic Syntax: Search, Sorting, Paging, and Aggregation
- 23🔗 Joins and Fetch Joins: The Solution to N+1
- 24🚦 Dynamic Query: BooleanBuilder · Multi-Parameter
- 25⚡ Performance Optimization: DTO Projections and Bulk Operations
If you can handle CRUD but can't explain what's happening internally.
Who this is for
Those who have performed CRUD with JdbcTemplate but do not know about the "Persistence Context"
Those who know save() but don't know "what happens internally"
Those who cannot find the N+1 problem when it occurs in their own code
Those who want to answer the question "Explain the persistence context" based on actual experience
Those who need to align their expectations
- Those who are completely new to Spring and JPA (Lv.1 is recommended first)
- Those who are unfamiliar with Java syntax itself
- Those who insist on using only pure SQL without an ORM
Lv.2 — You can start if you have experience at the Lv.1 level.
Experience handling Spring even just a little (Recommended to have completed Lv.1 Spring Boot Introduction).
MySQL CRUD experience.
IntelliJ Community (Free) is sufficient — works on both Windows and Mac, installation guides provided for each OS.
By the end of this course, you will be able to do these four things.
Explains the internal operations of the persistence context, including the first-level cache and dirty checking.
Solve the N+1 problem using three methods, including Fetch Join.
Association mapping resolves the object-table paradigm mismatch.
QueryDSL is used to create type-safe dynamic queries at compile time.
Directly taught by a current developer who has reached the final interview stages at Coupang and Yanolja.
A 6-year developer who reached the final interviews at Coupang and Yanolja, and an instructor with a story of switching between 24 companies, teaches you directly.
Former Viva Republica (Toss) Server Developer — Explaining the "Why" from a field-proven perspective.
This is not a lecture that ends with just teaching you "how"; it connects concepts to hands-on experience and even interview answers.
I support students until the end by operating a developer career success community (KakaoTalk/Discord).
If you leave a course review, you will receive a JPA interview question workbook.
A Notion workbook for self-practice, featuring frequently asked interview questions and model answers on topics such as Persistence Context, N+1 problems, and QueryDSL.
Expand and check only the parts you are curious about.
JPA를 처음 보는데 들어도 되나요?
This course is Lv.2. It assumes you have experience performing CRUD with JdbcTemplate or have a level of proficiency equivalent to Lv.1 Spring Boot Introduction. If you are completely new to JPA, we recommend starting from Lv.1.
따라하기 강의랑 뭐가 다른가요?
I intentionally inflict pain first. Only after you've manually written 35 lines of code for a single SELECT using pure JDBC and experienced the hell of 11 queries exploding due to N+1, will you truly appreciate the greatness of three lines of persistence context and a single line of Fetch Join. This experience will form the basis of interview answers that begin with, "I've actually experienced this myself."
실습 환경은 어떻게 되나요?
We use IntelliJ. The Community (free) version is sufficient, and it is available for both Windows and Mac. Learning materials (Notion, PDF) and project code will be shared.
이 강의를 들으면 어디까지 할 수 있나요?
Master JPA's most frequently used features in practice, including persistence context, associations, proxies, inheritance mapping, value types, and QueryDSL. This is Level 2 of the Backend Roadmap, the next step after Level 1 (Introduction to Spring Boot).
Don't just memorize it; explain the persistence context down to the 'why'.
You must experience the pain of 35 lines of JDBC to see the revolution of 3 lines of JPA. You must go through the hell of N+1 to have Fetch Join engraved in your bones. Five weeks later, you will be giving answers that start with, "I’ve actually experienced this myself."
Recommended for
these people
Who is this course right for?
Those who want to get a feel for what JPA is and why it should be used.
Those who want to induce follow-up questions from interviewers with experience-based answers
For those who understand @ManyToOne but are confused about why bidirectional relationships are necessary and what mappedBy actually is.
Those who want to understand the principles of when queries are executed, how change detection works, and why there is no need to use update().
Those who need the practical ability to read query logs and resolve issues directly.
Need to know before starting?
Java Basic Syntax (if statements, for statements, classes, interfaces)
Experience building a simple REST API with Spring Boot
Experience performing DB CRUD using JdbcTemplate (basics such as SQL SELECT, INSERT, etc.)
Hello
This is dingcodingco
Inflearn Verified
Career Verified
18,038
Learners
1,845
Reviews
346
Answers
4.9
Rating
21
Courses
Free 15% discount coupon link!
🚀 Toss, POSTECH alumnus | Current Backend Developer (+9 years)
🎥20k YouTuber | Development Content Creator
📚 Inflearn Instructor | Over 18,000+ cumulative students
👥 Operating a developer career community (8,000+)
🧩 Contributor to various open-source projects (Gradle, Spring AI, etc.)
📝 Passed 38 document screenings and experienced 100+ resume reviews on Kmong (5.0 rating)
I deliver vivid, real-world industry information in an easy and deductively understandable way.
Tôi truyền đạt những thông tin thực tế sống động từ ngành công nghiệp một cách dễ hiểu và có tính diễn dịch.
Curriculum
All
41 lectures ∙ (9hr 39min)
Reviews
All
8 reviews
5.0
8 reviews
abeb30318Reviews 6
∙
Average Rating 5.0
tarrot1415Reviews 3
∙
Average Rating 5.0
5
100% enrolledIt explains JPA very easily and provides a clear explanation of the paradigm mismatch between objects and database tables along with relevant examples. Rather than just listing various JPA features, it recommends specific features to use and those to avoid, providing practical advice on how they are typically used in real-world development. For those already familiar with JPA in a professional setting, it serves as a great refresher course; for those using it for the first time or considering its adoption, it can be used as a guidebook to build services without much difficulty.
techietaekReviews 5
∙
Average Rating 5.0
5
100% enrolledThis course is designed to introduce and allow you to practice everything from the basics of JPA to production-level code. It doesn't stop at simple usage; by learning the internal working principles, I feel I was able to build an even more solid foundation! Thank you for the excellent lecture!
- brucehan
Reviews 94
∙
Average Rating 4.4
Edited
5
100% enrolledGreat things about this course - It teaches JPA very well with a focus on practical application. - Theories are explained through analogies, which helped me understand them quickly. Points to note when taking the course - You won't remember much if you just listen. That's why I think it's important to listen to one lecture, type along with the materials, and ensure you understand before moving on. Areas for improvement - There are occasional typos in the videos. For example, "polymorphism" is written as "diversity," and there are cases where words like "builder.and" are incorrectly displayed as "builder.end" in the subtitles.
trixielReviews 6
∙
Average Rating 5.0
dingcodingco's other courses
Check out other courses by the instructor!
Similar courses
Explore other courses in the same field!


![[Backend/Exception Handling Scenario/Aggregation Optimization] Backend Portfolio and Practical Experience Enhancement Strategy. All-in-One PART1Course Thumbnail](https://cdn.inflearn.com/public/courses/335091/cover/1a19a4de-ec2e-4e26-a84e-28691e777020/335091.jpg?w=420)



