Native Queries, Criteria API & Specification API – Complete Guide
Native Queries, Criteria API & Specification API – Complete Guide 1. What is a Native Query? Native Query means: Writing pure SQL inside JPA. Example: @Query(value = "SELECT *…
Native Queries, Criteria API & Specification API – Complete Guide 1. What is a Native Query? Native Query means: Writing pure SQL inside JPA. Example: @Query(value = "SELECT *…
JPA Relationship Mappings & Querying – Complete Notes 1. One-to-Many (Unidirectional) Concept One parent entity is associated with multiple child entities. Example: One User → Many Orders Important Problem…
JPA One-to-One Mapping – Complete Deep Dive 1. What exactly is One-to-One in ORM? In database: One row in Table A is linked to exactly one row in Table…
One-to-One Mapping in JPA – Complete Guide with Cascade, Fetch & JSON Issues One-to-One mapping in JPA is used when one entity is associated with exactly one instance of…
1. Hibernate DDL Auto Configuration spring.jpa.hibernate.ddl-auto This property tells Hibernate how to handle DB schema. Value Create Update Delete Use case none ❌ ❌ ❌ Does nothing – Best…
JPA – Second Level Cache (L2 Cache) What problem does L2 Cache solve? From your previous First Level Cache: Every HTTP request creates a new EntityManager Each EntityManager…
Spring Boot – JPA First Level Cache (Persistence Context) Core Concept (from PDF) First Level Cache = Persistence Context It is enabled by default in JPA/Hibernate. It is scoped…
Spring Boot JPA – Architecture (Part 2) JPA is not magic. Behind the scenes, Spring Boot creates and wires several components that work together whenever your API hits the…
Spring Boot JPA – Part 1 From JDBC Pain to ORM Power When we start working with databases in Java, the first thing we usually touch is JDBC. It…
Spring Boot – Exception Handling (Deep Notes) 1. Core Classes in Spring Exception Handling From the class diagram on page 1: HandlerExceptionResolver (interface) | HandlerExceptionResolverComposite | AbstractHandlerExceptionResolver | ---------------------------------------------------…