SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

HIBERNATE / NOTES</>↗
Hibernate11 Jun 2025

How do I write a simple JPQL query using Hibernate?

To write a simple JPQL (Java Persistence Query Language) query using Hibernate, follow these steps: Example: Basic JPQL Query For example, consider we have an entity: Employee package org.kodejava.hibernate; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; @Entity @Table(name = "employee") public class Employee { @Id private Long id; private String name; private String department; private Double […]

Wayan · 3 min read
HIBERNATE / NOTES</>↗
Hibernate11 Jun 2025

How do I configure Hibernate with an H2 in-memory database?

Configuring Hibernate with an H2 in-memory database is quite straightforward. Below is a guide for configuring Hibernate with an H2 database in a Spring Boot or standalone Jakarta EE project. Configuration for Hibernate with H2 in-memory database 1. Add Dependencies Ensure you have the necessary dependencies in your project. For a Maven project, include the […]

Wayan · 4 min read
HIBERNATE / NOTES</>↗
Hibernate10 Jun 2025

How do I use SessionFactory and Session in Hibernate 6?

Hibernate ORM 6 introduces several changes to its API compared to previous versions, especially in how SessionFactory and Session are used due to compliance with Jakarta EE and its updated imports (jakarta.persistence.*). Here’s a simple guide to using SessionFactory and Session in Hibernate 6: 1. Add Hibernate Dependencies Make sure to include the Hibernate 6 […]

Wayan · 5 min read
HIBERNATE / NOTES</>↗
Hibernate10 Jun 2025

How do I map a Java class to a database table using JPA annotations?

To map a Java class to a database table using JPA annotations, you primarily use annotations provided by jakarta.persistence. Here is a step-by-step guide: Key annotations for mapping: @Entity Marks the class as an entity that is mapped to a table. @Table (optional) Specifies the table name in the database. If omitted, the default table […]

Wayan · 3 min read
HIBERNATE / NOTES</>↗
Hibernate09 Jun 2025

How do I perform basic CRUD operations using Hibernate 6?

Basic CRUD operations with Hibernate 6 involve creating, reading, updating, and deleting records in a database using Hibernate ORM. Hibernate simplifies these operations through its API. Below is an explanation of each CRUD operation along with corresponding examples: 1. Create (Insert) To save a new object in the database, you use the persist() or save() […]

Wayan · 3 min read
HIBERNATE / NOTES</>↗
Hibernate09 Jun 2025

How do I configure hibernate.cfg.xml for a simple application?

To configure hibernate.cfg.xml for a simple Hibernate application, you need to include the essential properties for Hibernate to interact with the database and map your entities. Below is an example of hibernate.cfg.xml: <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <!– Database connection settings –> <property name="hib...

Wayan · 3 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.