Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

10/3/2021 Learn JPA & Hibernate | Baeldung

(/)

Learn JPA & Hibernate


Last modi ed: January 7, 2021

by baeldung (https://www.baeldung.com/author/baeldung/)

Persistence (https://www.baeldung.com/category/persistence/)
Series (https://www.baeldung.com/category/series/)
Hibernate (https://www.baeldung.com/tag/hibernate/)
JPA (https://www.baeldung.com/tag/jpa/)

The early-bird price of the new Learn Spring Data JPA


course is increasing by $35 on Friday:
>> GET ACCESS NOW (https://www.baeldung.com/learn-
spring-data-jpa-course#table)

Object-Relational Mapping (ORM) is the process of converting Java


objects to database tables. In other words, this allows us to interact
with a relational database without any SQL. The Java Persistence
API (JPA) is a speci cation that de nes how to persist data in Java
applications. The primary focus of JPA is the ORM layer.

https://www.baeldung.com/learn-jpa-hibernate 1/6
10/3/2021 Learn JPA & Hibernate | Baeldung

Hibernate is one of the most popular Java ORM frameworks in use


today. Its rst release was almost twenty years ago, and still has
excellent community support and regular releases. Additionally,
Hibernate is a standard implementation of the JPA speci cation,
with a few additional features that are speci c to Hibernate. Let's
take a look at some core features of JPA and Hibernate.

De ning Entities
 De ning JPA Entities(/jpa-entities)
 Hibernate Entity Lifecycle(/hibernate-entity-lifecycle)
 JPA Entity Lifecycle Events(/jpa-entity-lifecycle-events)
 Default Column Values in JPA(/jpa-default-column-values)
 JPA @Basic Annotation(/jpa-basic-annotation)
 Mapping Entity Class Names to SQL Table Names (/jpa-entity-table-
with JPA names)
 Di erence Between @Size, @Length, and (/jpa-size-length-column-
@Column(length=value) di erences)
 JPA Entity Equality(/jpa-entity-equality)
 JPA @Embedded And @Embeddable(/jpa-embedded-embeddable)
 JPA Attribute Converters(/jpa-attribute-converters)
 Hibernate @NotNull vs @Column(nullable = (/hibernate-notnull-vs-
false) nullable)

Entity Relationships
 One-to-One Relationship in JPA(/jpa-one-to-one)
 Many-To-Many Relationship in JPA(/jpa-many-to-many)
 @JoinColumn Annotation Explained(/jpa-join-column)
 Di erence Between @JoinColumn and
https://www.baeldung.com/learn-jpa-hibernate
(/jpa joincolumn vs 2/6
10/3/2021 Learn JPA & Hibernate | Baeldung
 Di erence Between @JoinColumn and (/jpa-joincolumn-vs-
mappedBy mappedby)

 Mapping a Single Entity to Multiple (/jpa-mapping-single-entity-to-


Tables in JPA multiple-tables)
 Overview of JPA/Hibernate Cascade Types(/jpa-cascade-types)
 Hibernate @WhereJoinTable Annotation(/hibernate-wherejointable)
 Hibernate Inheritance Mapping(/hibernate-inheritance)
 Hibernate One to Many Annotation Tutorial(/hibernate-one-to-many)

Identi ers
 An Overview of Identi ers in Hibernate/JPA(/hibernate-identi ers)
 Composite Primary Keys in JPA(/jpa-many-to-many)
 When Does JPA Set the Primary (/jpa-strategies-when-set-primary-
Key key)

Read Operations
 Types of JPA Queries(/jpa-queries)
 JPA Query Parameters Usage(/jpa-composite-primary-keys)
 Constructing a JPA Query Between Unrelated (/jpa-query-
Entities parameters)
 Working with Lazy Element Collections in (/java-jpa-lazy-
JPA collections)
 JPA Join Types(/jpa-join-types)
 FetchMode in Hibernate(/hibernate-fetchmode)
 Hibernate Named Query(/hibernate-named-query)

Query Criteria
https://www.baeldung.com/learn-jpa-hibernate 3/6
10/3/2021 Learn JPA & Hibernate | Baeldung

 Combining JPA And/Or Criteria (/jpa-and-or-criteria-


Predicates predicates)
 Criteria API – An Example of IN (/jpa-criteria-api-in-
Expressions expressions)
 JPA Criteria Queries(/hibernate-criteria-queries)

Pagination and Sorting


 Sorting with JPA(/jpa-sort)
 JPA Pagination(/jpa-pagination)
 Hibernate Pagination(/hibernate-pagination)
 JPA Criteria Queries(/hibernate-criteria-queries)

Query Results
 A Guide to SqlResultSetMapping(/jpa-sql-resultset-mapping)
 Customizing the Result of JPA Queries (/jpa-queries-custom-result-
with Aggregation Functions with-aggregation-functions)

Write Operations
 INSERT Statement in JPA(/jpa-insert)
 Batch Insert/Update with (/jpa-hibernate-batch-insert-
Hibernate/JPA update)
 Deleting Objects with Hibernate(/delete-with-hibernate)
 Hibernate: save, persist, update, (/hibernate-save-persist-update-
merge, saveOrUpdate merge-saveorupdate)

https://www.baeldung.com/learn-jpa-hibernate 4/6
10/3/2021 Learn JPA & Hibernate | Baeldung

The early-bird price of the new Learn Spring


Data JPA course is increasing by $35 on
Friday:
>> GET ACCESS NOW (/learn-spring-data-jpa-
course#table)

Comments are closed on this article!

CATEGORIES
SPRING (HTTPS://WWW.BAELDUNG.COM/CATEGORY/SPRING/)
REST (HTTPS://WWW.BAELDUNG.COM/CATEGORY/REST/)
JAVA (HTTPS://WWW.BAELDUNG.COM/CATEGORY/JAVA/)
SECURITY (HTTPS://WWW.BAELDUNG.COM/CATEGORY/SECURITY-2/)
PERSISTENCE (HTTPS://WWW.BAELDUNG.COM/CATEGORY/PERSISTENCE/)
JACKSON (HTTPS://WWW.BAELDUNG.COM/CATEGORY/JSON/JACKSON/)
HTTP CLIENT-SIDE (HTTPS://WWW.BAELDUNG.COM/CATEGORY/HTTP/)

SERIES
JAVA “BACK TO BASICS” TUTORIAL (/JAVA-TUTORIAL)
JACKSON JSON TUTORIAL (/JACKSON)
HTTPCLIENT 4 TUTORIAL (/HTTPCLIENT-GUIDE)
REST WITH SPRING TUTORIAL (/REST-WITH-SPRING-SERIES)
SPRING PERSISTENCE TUTORIAL (/PERSISTENCE-WITH-SPRING-SERIES)
SECURITY WITH SPRING (/SECURITY-SPRING)

ABOUT
ABOUT BAELDUNG (/ABOUT)

https://www.baeldung.com/learn-jpa-hibernate 5/6
10/3/2021 Learn JPA & Hibernate | Baeldung

THE COURSES (HTTPS://COURSES.BAELDUNG.COM)


JOBS (/TAG/ACTIVE-JOB/)
THE FULL ARCHIVE (/FULL_ARCHIVE)
WRITE FOR BAELDUNG (/CONTRIBUTION-GUIDELINES)
EDITORS (/EDITORS)
OUR PARTNERS (/PARTNERS)
ADVERTISE ON BAELDUNG (/ADVERTISE)

TERMS OF SERVICE (/TERMS-OF-SERVICE)


PRIVACY POLICY (/PRIVACY-POLICY)
COMPANY INFO (/BAELDUNG-COMPANY-INFO)
CONTACT (/CONTACT)

https://www.baeldung.com/learn-jpa-hibernate 6/6

You might also like