Hibernate Basics

Configure Hibernate with Spring Boot

Learn to configure hibernate/JPA support in Spring Boot2 applications, along with creating entity classes and extending inbuilt JpaRepository interfaces.

Hibernate save(), update() and saveOrUpdate()

Learn the different methods for persisting and updating the entity states in the database using Hibernate Session APIs to use save(), update() and saveOrUpdate() methods under different usecases. Starting Hibernate 6.0, all save(), update() and saveOrUpdate() methods have been marked deprecated in favor of Jakarta persistence API provided persist() and …

Defining Hibernate Association Mappings

When we annotate the Java POJOs with JPA annotations and make them persistent entities, we can face situations where two entities can be related, and we must reference these entities from each other. This reference between the entities can be either uni-direction or in bi-direction. Creating these references is called …

Hibernate Entity LifeCycle

A hibernate entity, in context to persistence context or Session, can have 4 lifecycle states: transient, persistent, detached and removed.

RESTEasy Bean Validation using Hibernate Validator Provider

The Bean Validation API (JSR-303) defines a meta-data model and API for bean validation based on annotations. The functionality is achieved through the resteasy-hibernatevalidator-provider component. In order to integrate, we need to add resteasy-hibernatevalidator-provider.jar and hibernate-validator.jar files to the classpath. If you are using maven the, you need to add …

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.