Domain Model
The entities, DTOs (Java Records), and enums that represent the core concepts of a loan application — and why each was designed the way it was.
The entities, DTOs (Java Records), and enums that represent the core concepts of a loan application — and why each was designed the way it was.
The Hibernate internals every Spring Boot developer must understand — SessionFactory vs Session thread safety, entity states, dirty checking, first-level cache, second-level cache, and LazyInitializationException.
How to map Java classes to database tables using @Entity, @Id, @GeneratedValue, and relationship annotations (@OneToMany, @ManyToOne), including fetch type defaults and their implications.
Hands-on code examples for JPA entity mapping, relationships, fetch types, and Spring Data auditing in a simple e-commerce domain.
A clear breakdown of how JPA, Hibernate, Spring Data, and Spring Data JPA relate to each other — the layer model every developer must understand before working with any of them.
Hands-on examples demonstrating how N+1 queries occur and how to fix them with JOIN FETCH, @EntityGraph, and @BatchSize.
How LoanApplication is mapped to H2 using JPA @Embeddable value objects, @ElementCollection for rejection reasons, and @PrePersist for UUID generation.
Consolidated interview Q&A for Spring Data JPA covering JPA mapping, repositories, transactions, N+1, projections, and caching — beginner through advanced.
Quick-reference summary of Spring Data JPA — entity mapping, repository methods, transactions, N+1, projections, and caching.
How to use interface projections, DTO projections, and dynamic projections in Spring Data JPA to select only the columns you need in a single optimized query.
Hands-on examples for closed interface projections, nested projections, DTO projections with records, and dynamic projections.
How Spring Data JPA's repository interfaces (CrudRepository, JpaRepository) eliminate DAO boilerplate through query method derivation and @Query for JPQL and native SQL.
Hands-on examples for Spring Data JPA query methods, @Query JPQL/native SQL, @Modifying, pagination, and the Specification API.
What causes N+1 queries in JPA/Hibernate, how to diagnose them, and how to fix them with JOIN FETCH, @EntityGraph, DTO projections, and batch fetching.