Kawsar Ahmed Bhuiyankawsar.hashnode.dev·Sep 8, 2023Understanding FetchType, FetchMode, and Lazy Loading in JPA with HibernateJava Persistence API (JPA) is a powerful Java framework for managing relational data in applications. When working with JPA, it's crucial to understand how data is fetched from the database and how to control this behavior effectively. In this articl...Discuss·29 readshibernate
Robert Niestrojrobertniestroj.hashnode.dev·Sep 6, 2023How DTO Projections can make your #Java #JPA app faster, better, strongerStandard JPQL Queries fetch entities. This means all basic attributes and FetchType.EAGER associations will be fetched. So as entities grow over time the generated SQL queries also will grow. A simple @Query like this: @Query("select e from Employe...Discuss·179 readsJava
Tamilselvendhirantamil.hashnode.dev·Aug 16, 2023How @PostLoad annotation works in Spring Boot JPATable of Contents Introduction🤞 How does @PostLoad annotation work🤷♂️ Conclusion🦾 Introduction The @PostLoad annotation in Spring Boot is a JPA annotation that is used to specify a callback method that will be invoked after an entity is load...DiscussJava
Manas Patramanasdroidtech.hashnode.dev·Aug 15, 2023JPA and Hibernate in simple terms.Let's first go by the conventional explanation of both of them. JPA stands for "Java Persistence API." It is a specification in the Java EE (Enterprise Edition) ecosystem that provides a standardized way to manage relational data in Java applications...Discussjpa
Nilesh Wanicodingmoments.hashnode.dev·Jul 29, 2023Execution order of SQL statements in JPA / HibernateIn my project, I was having a database table with a unique constraint on a column. Using Spring Data JPA, in the same transaction, I was first deleting a record from that table and then adding back a record with the same value for that unique column....Discuss·1 like·124 readshibernate
Asfaq Leeonleeonscoding.hashnode.dev·Jul 23, 2023Intro to Spring Data JPA. The Entity class and its annotationsJPA(Jakarta Persistence API) lets us map objects to a relational database. Formerly it was known as Java Persistence API. JPA is a specification of data persistence in Java applications. In this blog, I'm going to write about basic configurations and...Discussentity
Sohail Shahsohailshah.hashnode.dev·Jul 21, 2023JPA : One-To-Many, Many-To-One And Many-To-Many RelationshipsIn the previous post, we looked at one-to-one relationship. In this post, we will look at one-to-many, many-to-one, and many-to-many relationships. Many-To-One Relationship In a many-to-one relationship, multiple entities are associated with exactly ...DiscussJava
Hamid Safdarihamidsafdari.com·Jul 11, 2023QueryDSL for JPAIf we could say Hibernate provides a way to map database tables to classes, QueryDSL does the same for queries. QueryDSL lets you leverage the same entities defined for Hibernate and uses them to make legible queries that closely resemble native SQL ...Discussjpa
Sohail Shahsohailshah.hashnode.dev·Jul 11, 2023JPA: One-To-One Relationship, Fetch type, Relationship Direction, And Query OptimizationIn the previous posts, we had only a single entity called the student. Let's create another entity named the library card. The library card entity will have its own table in the database with its own primary id column. @Entity @Table(name = "library_...DiscussJava
Sohail Shahsohailshah.hashnode.dev·Jun 25, 2023Persisting non-primitive types in JPAIn this post, we'll look at how we can persist non-primitive data types in JPA. The primitive data types like int, char, byte, String, boolean, or their respective wrapper classes are mapped automatically by default into the correct database types by...DiscussJava