Java Hibernate Basics: SessionFactory, Session and HQL

Su Suriya Ravichandran Updated 18 Nov 2026
13 min read ·Lesson 223 of 306

Java Hibernate (Hibernate ORM) is the most widely used object-relational mapping framework for Java. It implements the JPA standard you met in the previous lesson, and it also has its own native API built around SessionFactory, Session and HQL, the Hibernate Query Language.

Hibernate is the persistence engine inside Spring Data JPA, Quarkus and many other frameworks, so understanding it helps you read their logs and fix their problems. In this lesson you will map two related entities, build a SessionFactory, save, load, update and delete objects with a Session, write HQL queries, understand lazy loading, and build a small library lending service.


Hibernate and JPA: The Same Ideas with Different Names

Hibernate's native types map one to one onto JPA types. In fact, a Hibernate Session is a JPA EntityManager, and a SessionFactory is an EntityManagerFactory.

Hibernate native APIJPA standard APIRole
SessionFactoryEntityManagerFactoryCreated once; holds mappings and the connection pool
SessionEntityManagerOne unit of work; tracks managed objects
TransactionEntityTransactionCommit or roll back
HQLJPQLObject-oriented query language (HQL is a superset)
Configuration / hibernate.propertiespersistence.xmlBootstrapping and settings

Entities are mapped with the same jakarta.persistence annotations either way. You can freely mix the two styles: for example, call session.unwrap(...) from JPA code, or use JPQL-style queries in a Session.


Adding Hibernate to a Java Project

Use hibernate-core plus a JDBC driver. The examples use the in-memory H2 database.

<dependencies>
    <dependency>
        <groupId>org.hibernate.orm</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>7.4.0.Final</version>
    </dependency>
    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>2.3.232</version>
    </dependency>
</dependencies>

How it works:

  • Hibernate 7 implements Jakarta Persistence 3.2 and requires Java 17 or newer. Use the latest 7.x release from Maven Central.
  • The group id is org.hibernate.orm. Very old tutorials use org.hibernate, which stops at version 5.

Note: Hibernate writes INFO log lines when it starts. The outputs in this lesson show only what the programs print with System.out.


Mapping Hibernate Entities with a Relationship

The examples use a small library: each Book is written by one Author, and an author can have many books. Both classes live in the package com.gocourse.library.

package com.gocourse.library;

import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;

@Entity
public class Author {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private String name;

    protected Author() { }

    public Author(String name) {
        this.name = name;
    }

    public Long getId() { return id; }
    public String getName() { return name; }
}
package com.gocourse.library;

import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;

@Entity
public class Book {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private String title;
    private int price;            // in rupees
    private int copiesAvailable;

    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private Author author;        // stored as a foreign key column author_id

    protected Book() { }

    public Book(String title, int price, int copiesAvailable, Author author) {
        this.title = title;
        this.price = price;
        this.copiesAvailable = copiesAvailable;
        this.author = author;
    }

    public Long getId() { return id; }
    public String getTitle() { return title; }
    public int getPrice() { return price; }
    public int getCopiesAvailable() { return copiesAvailable; }
    public void setCopiesAvailable(int copiesAvailable) { this.copiesAvailable = copiesAvailable; }
    public Author getAuthor() { return author; }
}

The tables Hibernate generates look like this:

Author                     Book
+----+---------+           +----+---------------+-------+-----------------+-----------+
| id | name    |  1 ---- * | id | title         | price | copiesAvailable | author_id |
+----+---------+           +----+---------------+-------+-----------------+-----------+

How it works:

  • These are standard JPA annotations, exactly as in the Java JPA lesson.
  • @ManyToOne says many books point to one author. Hibernate stores the link as a foreign key column named author_id.
  • fetch = FetchType.LAZY tells Hibernate not to load the author until the code actually needs it. optional = false makes the column NOT NULL.

Building a Hibernate SessionFactory

The native way to start Hibernate is the Configuration class: register the entity classes, set properties and call buildSessionFactory(). A small helper keeps this in one place.

package com.gocourse.library;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public final class HibernateUtil {

    private HibernateUtil() { }

    public static SessionFactory buildSessionFactory() {
        return new Configuration()
                .addAnnotatedClass(Author.class)
                .addAnnotatedClass(Book.class)
                .setProperty("jakarta.persistence.jdbc.url", "jdbc:h2:mem:library;DB_CLOSE_DELAY=-1")
                .setProperty("jakarta.persistence.jdbc.user", "sa")
                .setProperty("jakarta.persistence.jdbc.password", "")
                .setProperty("hibernate.hbm2ddl.auto", "create-drop")
                .buildSessionFactory();
    }
}
PropertyExample valuePurpose
jakarta.persistence.jdbc.urljdbc:h2:mem:libraryJDBC URL of the database
jakarta.persistence.jdbc.user / .passwordsa / emptyDatabase login
hibernate.hbm2ddl.autocreate-drop, update, validate, noneWhether Hibernate creates, updates or only checks tables
hibernate.show_sqltruePrint every SQL statement Hibernate runs
hibernate.format_sqltruePretty-print the printed SQL
hibernate.hikari.maximumPoolSize10Pool size, when the hibernate-hikaricp module is added

To give every example the same starting data, this helper saves two authors and three books:

package com.gocourse.library;

import org.hibernate.SessionFactory;

public final class LibraryData {

    private LibraryData() { }

    public static void seed(SessionFactory sessionFactory) {
        sessionFactory.inTransaction(session -> {
            Author kalki = new Author("Kalki");
            Author sujatha = new Author("Sujatha");
            session.persist(kalki);
            session.persist(sujatha);

            session.persist(new Book("Ponniyin Selvan", 650, 3, kalki));
            session.persist(new Book("Sivagamiyin Sabatham", 420, 1, kalki));
            session.persist(new Book("En Iniya Iyandhira", 250, 2, sujatha));
        });
    }
}

How it works:

  • SessionFactory is expensive to build: Hibernate reads every mapping and prepares SQL. Build it once at startup and close it at shutdown.
  • create-drop creates the tables when the factory starts and drops them when it closes. It is ideal for tests; production systems use validate or none with a migration tool.
  • inTransaction() opens a Session, begins a transaction, runs your lambda, commits (or rolls back if it throws) and closes the session.
  • With IDENTITY keys, the authors get ids 1 and 2, and the books get ids 1, 2 and 3 in the order they are saved.

Note: Hibernate also accepts the older property names such as hibernate.connection.url. The jakarta.persistence.* names shown here are the standard ones and work in both native and JPA bootstrapping.


Saving and Loading Objects with a Hibernate Session

persist() saves a new object and find() loads one by id. fromTransaction() is like inTransaction() but returns a value from the lambda.

package com.gocourse.library;

import org.hibernate.SessionFactory;

public class SaveAndLoad {
    public static void main(String[] args) {
        try (SessionFactory sessionFactory = HibernateUtil.buildSessionFactory()) {
            LibraryData.seed(sessionFactory);

            Long newBookId = sessionFactory.fromTransaction(session -> {
                Author sujatha = session.find(Author.class, 2L);
                Book book = new Book("Karaiyellam Shenbagapoo", 300, 4, sujatha);
                session.persist(book);
                return book.getId();
            });
            System.out.println("New book id: " + newBookId);

            String summary = sessionFactory.fromTransaction(session -> {
                Book book = session.find(Book.class, newBookId);
                return book.getTitle() + " by " + book.getAuthor().getName()
                        + ", Rs." + book.getPrice() + ", copies: " + book.getCopiesAvailable();
            });
            System.out.println(summary);

            Book missing = sessionFactory.fromTransaction(session -> session.find(Book.class, 99L));
            System.out.println("Book 99: " + missing);
        }
    }
}

Output:

New book id: 4
Karaiyellam Shenbagapoo by Sujatha, Rs.300, copies: 4
Book 99: null

How it works:

  • The first transaction loads author 2 and links the new book to it. The book is the fourth one saved, so its id is 4.
  • In the second transaction, book.getAuthor().getName() triggers a small extra SELECT for the author, because the relationship is lazy. That works because the session is still open.
  • find() returns null when no row has the id, just like the JPA EntityManager.

Updating and Deleting with a Session

Hibernate saves changes to managed objects automatically at commit (dirty checking). remove() deletes a managed object.

package com.gocourse.library;

import org.hibernate.SessionFactory;

public class UpdateAndDelete {
    public static void main(String[] args) {
        try (SessionFactory sessionFactory = HibernateUtil.buildSessionFactory()) {
            LibraryData.seed(sessionFactory);

            // Update: change a managed object, no SQL written by hand
            sessionFactory.inTransaction(session -> {
                Book book = session.find(Book.class, 1L);
                book.setCopiesAvailable(book.getCopiesAvailable() + 2);
            });

            // Delete: remove a managed object
            sessionFactory.inTransaction(session -> {
                Book book = session.find(Book.class, 3L);
                session.remove(book);
            });

            sessionFactory.inSession(session -> {
                System.out.println("Book 1 copies: " + session.find(Book.class, 1L).getCopiesAvailable());
                System.out.println("Book 3 after remove: " + session.find(Book.class, 3L));
            });
        }
    }
}

Output:

Book 1 copies: 5
Book 3 after remove: null

How it works:

  • Ponniyin Selvan started with 3 copies. The setter changes the object to 5, and Hibernate writes the UPDATE when the transaction commits.
  • remove() schedules the DELETE for book 3, which runs at commit.
  • inSession() opens a session without a transaction, which is enough for simple reads.

Note: Older Hibernate code uses session.save(), session.update(), session.saveOrUpdate() and session.delete(). These were deprecated in Hibernate 6 and removed in Hibernate 7. Use persist(), dirty checking or merge(), and remove() instead.


Writing HQL Queries in Hibernate

HQL (Hibernate Query Language) queries entities and fields, like JPQL, and adds a few extras: for example, you may leave out select when you want whole entities. createSelectionQuery() creates a typed query.

package com.gocourse.library;

import org.hibernate.SessionFactory;

import java.util.List;

public class HqlQueries {
    public static void main(String[] args) {
        try (SessionFactory sessionFactory = HibernateUtil.buildSessionFactory()) {
            LibraryData.seed(sessionFactory);

            sessionFactory.inSession(session -> {
                // 1. Entities with a parameter; "select b" is optional in HQL
                List<Book> cheapBooks = session
                        .createSelectionQuery("from Book where price < :maxPrice order by title", Book.class)
                        .setParameter("maxPrice", 500)
                        .getResultList();
                System.out.println("Under Rs.500:");
                cheapBooks.forEach(book -> System.out.println("  " + book.getTitle() + " - " + book.getPrice()));

                // 2. Navigating a relationship in the where clause
                List<String> kalkiTitles = session
                        .createSelectionQuery("select b.title from Book b where b.author.name = :name order by b.title", String.class)
                        .setParameter("name", "Kalki")
                        .getResultList();
                System.out.println("By Kalki: " + kalkiTitles);

                // 3. A single aggregate value
                Long totalCopies = session
                        .createSelectionQuery("select sum(b.copiesAvailable) from Book b", Long.class)
                        .getSingleResult();
                System.out.println("Total copies: " + totalCopies);

                // 4. Several values per row, grouped
                List<Object[]> perAuthor = session
                        .createSelectionQuery("select a.name, count(b) from Book b join b.author a group by a.name order by a.name", Object[].class)
                        .getResultList();
                for (Object[] row : perAuthor) {
                    System.out.println(row[0] + " has " + row[1] + " book(s)");
                }
            });
        }
    }
}

Output:

Under Rs.500:
  En Iniya Iyandhira - 250
  Sivagamiyin Sabatham - 420
By Kalki: [Ponniyin Selvan, Sivagamiyin Sabatham]
Total copies: 6
Kalki has 2 book(s)
Sujatha has 1 book(s)

How it works:

  • from Book where price < :maxPrice is valid HQL without select. Two books cost less than 500, sorted by title.
  • b.author.name walks the relationship; Hibernate adds the SQL join for you.
  • sum() of an int field returns a Long in HQL. The copies are 3 + 1 + 2 = 6.
  • A query that selects more than one value returns each row as an Object[], in the order of the select list.
HQL featureExample
Named parameterwhere b.price < :maxPrice
Navigate a relationwhere b.author.name = :name
Explicit joinfrom Book b join b.author a
Join fetch (load related data now)from Book b join fetch b.author
Aggregatescount(b), sum(...), avg(...), max(...)
Groupinggroup by a.name having count(b) > 1

Lazy Loading and LazyInitializationException

A lazy relationship is loaded only when you touch it, and only while the session is open. Touching it after the session closes throws LazyInitializationException, one of the most common Hibernate errors.

package com.gocourse.library;

import org.hibernate.LazyInitializationException;
import org.hibernate.SessionFactory;

public class LazyLoadingDemo {
    public static void main(String[] args) {
        try (SessionFactory sessionFactory = HibernateUtil.buildSessionFactory()) {
            LibraryData.seed(sessionFactory);

            // The session closes when fromTransaction returns
            Book detachedBook = sessionFactory.fromTransaction(session -> session.find(Book.class, 1L));
            System.out.println("Title: " + detachedBook.getTitle());

            try {
                System.out.println("Author: " + detachedBook.getAuthor().getName());
            } catch (LazyInitializationException e) {
                System.out.println("Error: " + e.getClass().getSimpleName());
            }

            // Fix: load the author in the same query with join fetch
            Book bookWithAuthor = sessionFactory.fromTransaction(session -> session
                    .createSelectionQuery("from Book b join fetch b.author where b.id = :id", Book.class)
                    .setParameter("id", 1L)
                    .getSingleResult());
            System.out.println("Author (join fetch): " + bookWithAuthor.getAuthor().getName());
        }
    }
}

Output:

Title: Ponniyin Selvan
Error: LazyInitializationException
Author (join fetch): Kalki

How it works:

  • find() loads the book's own columns. Because the author is lazy, getAuthor() returns a proxy: a placeholder that knows only the author's id.
  • Calling getName() on the proxy after the session has closed cannot run a query, so Hibernate throws LazyInitializationException.
  • join fetch b.author loads the book and its author in a single SQL query, so the author is ready to use after the session closes.

Note: Do not "fix" this error by switching every relationship to FetchType.EAGER. Eager loading fetches related data even when you do not need it and can turn one query into dozens. Keep relationships lazy and use join fetch in the queries that need the related data.


Real-World Example: A Library Lending Service

This service puts the pieces together: one SessionFactory, a short transaction per operation, business rules in Java, dirty checking for updates and an HQL report.

package com.gocourse.library;

import org.hibernate.SessionFactory;

import java.util.List;

public class LibraryApp {

    static class LendingService {
        private final SessionFactory sessionFactory;

        LendingService(SessionFactory sessionFactory) {
            this.sessionFactory = sessionFactory;
        }

        String borrow(long bookId) {
            return sessionFactory.fromTransaction(session -> {
                Book book = session.find(Book.class, bookId);
                if (book == null) {
                    return "No book with id " + bookId;
                }
                if (book.getCopiesAvailable() == 0) {
                    return "Sorry, '" + book.getTitle() + "' is not available";
                }
                book.setCopiesAvailable(book.getCopiesAvailable() - 1); // UPDATE at commit
                return "Borrowed '" + book.getTitle() + "', copies left: " + book.getCopiesAvailable();
            });
        }

        String giveBack(long bookId) {
            return sessionFactory.fromTransaction(session -> {
                Book book = session.find(Book.class, bookId);
                book.setCopiesAvailable(book.getCopiesAvailable() + 1);
                return "Returned '" + book.getTitle() + "', copies now: " + book.getCopiesAvailable();
            });
        }

        void printStockReport() {
            List<Object[]> rows = sessionFactory.fromTransaction(session -> session
                    .createSelectionQuery("""
                            select a.name, count(b), sum(b.copiesAvailable)
                            from Book b join b.author a
                            group by a.name
                            order by a.name""", Object[].class)
                    .getResultList());

            System.out.println("Author      Titles  Copies");
            for (Object[] row : rows) {
                System.out.printf("%-11s %6s %7s%n", row[0], row[1], row[2]);
            }
        }

        List<String> outOfStock() {
            return sessionFactory.fromTransaction(session -> session
                    .createSelectionQuery("select b.title from Book b where b.copiesAvailable = 0 order by b.title", String.class)
                    .getResultList());
        }
    }

    public static void main(String[] args) {
        try (SessionFactory sessionFactory = HibernateUtil.buildSessionFactory()) {
            LibraryData.seed(sessionFactory);
            LendingService lending = new LendingService(sessionFactory);

            System.out.println(lending.borrow(2));   // the only copy
            System.out.println(lending.borrow(2));   // none left
            System.out.println(lending.borrow(99));  // unknown id
            System.out.println(lending.borrow(1));
            System.out.println("Out of stock: " + lending.outOfStock());

            System.out.println(lending.giveBack(2));
            System.out.println("Out of stock: " + lending.outOfStock());

            lending.printStockReport();
        }
    }
}

Output:

Borrowed 'Sivagamiyin Sabatham', copies left: 0
Sorry, 'Sivagamiyin Sabatham' is not available
No book with id 99
Borrowed 'Ponniyin Selvan', copies left: 2
Out of stock: [Sivagamiyin Sabatham]
Returned 'Sivagamiyin Sabatham', copies now: 1
Out of stock: []
Author      Titles  Copies
Kalki            2       3
Sujatha          1       2

How it works:

  1. One factory, short sessions. main builds the SessionFactory once. Every service method opens a session through fromTransaction(), does one job and closes it, so no session lives longer than a single operation.
  2. Business rules in Java. borrow() checks for a missing book and for zero copies before changing anything. The second request for book 2 is refused because the first one took the only copy.
  3. Updates by dirty checking. Neither borrow() nor giveBack() writes SQL. Changing copiesAvailable on the managed Book is enough; Hibernate writes the UPDATE at commit.
  4. HQL for reporting. The report uses a Java text block for a readable multi-line query. Kalki has 2 titles with 2 + 1 = 3 copies after the lending activity, and Sujatha has 1 title with 2 copies.

Note: Two users borrowing the last copy at the same moment could both see 1 and both succeed. Real lending systems prevent this with optimistic locking: add a @Version field to Book, and Hibernate will reject the second, stale update.

Hibernate runs every one of these operations over JDBC, so the Java connection pooling and Java JDBC Transactions lessons still apply underneath. With entities and databases covered, the tutorial now moves to organizing larger Java applications, starting with packages.

0 Comments

Reviewed before they appear

No comments yet.

Java
Java Introduction Java Features Java Syntax Java Comments Java Statements Java Output Java Variables Java Data Types Java Type Casting Java Operators Java Strings Java Numbers Java Math Java Booleans Java User Input Java Conditions Java If Else Java Switch Java While Loop Java For Loop Java Break Java Continue Java Arrays Java Methods Java Parameters Java Return Values Java Scope Java Recursion Install Java Install JDK Java IDEs Java JDK Java JRE Java JVM Java Compiler Java File Compile Java Run Java JShell Basics Java Packages Java OOP Java Classes Java Objects Class Methods Constructors Constructor Overload this Keyword static Keyword final Keyword Encapsulation Inheritance Polymorphism Abstraction Access Modifiers super Keyword Method Overload Method Override Instanceof Operator Nested Classes Inner Classes Anonymous Classes Enums Records Array Basics Array Length Loop Arrays Multidimensional Arrays Array Copy Array Sorting Array Search ArrayList LinkedList HashSet TreeSet HashMap TreeMap Queue Interface Deque Interface Stack Class Iterator List Interface Set Interface Map Interface Collections Class Comparable Comparator Generics Basics Generic Classes Generic Methods Wildcards String Basics String Length String Methods String Concatenation String Compare String Search String Replace String Split String Format StringBuilder StringBuffer Text Blocks Regular Expressions Number Types Integer Class Float Class Double Class BigInteger BigDecimal Math Class Random Numbers Number Format Date Basics LocalDate LocalTime LocalDateTime ZonedDateTime Date Formatting Date Parsing Period Class Duration Class Java Instant Class Java Exception Basics Java try...catch Java Multiple Catch Blocks Java finally Block Java throw Keyword Java throws Keyword Java Checked Exceptions Java Unchecked Exceptions Java Custom Exceptions Java try-with-resources Java Exception Chaining Java File Basics Java Create Files Java Read Files Java Write Files Java Delete Files Java File Paths Java File Class Java BufferedReader Java BufferedWriter Java FileInputStream Java FileOutputStream Java Object Streams Java Directory Handling Java NIO Basics Java Files API Java Input Java Scanner Class Java Console Input Java PrintStream Java InputStream Java OutputStream Java Reader Class Java Writer Class Java Buffered Streams Java Data Streams Java Generics Introduction Java Generic Types Java Generic Methods Java Bounded Types Java Wildcards Java Type Erasure Java Generic Interfaces Java Generic Collections Java Lambda Basics Java Lambda Syntax Java Functional Interfaces Java Method References Java Stream API Java Stream Creation Java Stream Filter Java Stream Map Java Stream Reduce Java Stream Sort Java Stream Collect Java Collectors Class Java Optional Class Java Parallel Streams Java Threads: Thread Basics Create a Thread in Java Java Thread Class Java Runnable Interface Java Thread States Java Thread Sleep Java Thread Join Java Thread Priority Java Synchronization Java Thread Safety Java Race Conditions Java Deadlocks Java Executor Service Java Thread Pools Java Callable Interface Java Future Interface Java CompletableFuture Java Concurrent Collections Java Atomic Classes Java Virtual Threads Java Networking Basics Java URL Class Java URI Class Java HttpClient Java HTTP Requests Java HTTP Responses Java Socket Basics Java ServerSocket Java DatagramSocket Java WebSocket Basics Java JDBC Basics Java JDBC Setup Java Database Connection Java JDBC Connection Interface Java JDBC Statement Java PreparedStatement Java ResultSet Java JDBC CRUD Operations Java JDBC Transactions Java JDBC Batch Update Java Connection Pooling with HikariCP Java JPA Basics: Entities, EntityManager and JPQL Java Hibernate Basics: SessionFactory, Session and HQL Package in Java: Basics Explained with Examples Create Package in Java: Step-by-Step Guide with Examples Import Package in Java: The import Statement Explained Access Control in Java: Packages, Classes and Members JAR File in Java: Create, Run and Inspect JAR Files Java Modules: Introduction to the Java Module System module-info in Java: Every Module Directive Explained Java Module Path: How --module-path Finds Your Modules Java Classpath: How -cp and CLASSPATH Find Your Classes Java Annotations: Basics of @ Metadata in Java Java Built-in Annotations: @Override, @Deprecated and More Java Custom Annotations: Create Your Own @interface Java Annotation Targets: @Target and ElementType Explained Java Reflection API: Inspect and Use Classes at Runtime Java Class Metadata: Names, Modifiers, Hierarchy and Generic Java Dynamic Objects: Create Objects Dynamically With Reflec Java Dynamic Proxy: Intercept Method Calls With Proxy and In Java Security Java Secure Coding Java Password Hashing Java Input Validation Java Cryptography Basics Java KeyStore Basics Java TLS Basics Java SecureRandom Java JUnit Basics Java JUnit Test Methods JUnit Assertions JUnit Test Fixtures JUnit Parameterized Tests Mockito in Java Java Mock Objects Java Integration Testing Java Code Coverage Maven in Java Create a Maven Project in Java Maven Dependencies Maven Plugins Gradle in Java Gradle Build Gradle Dependencies Build Executable JAR in Java Build WAR File in Java HTTP Basics in Java Java Servlet Basics Servlet Lifecycle in Java HttpServletRequest in Java HttpServletResponse in Java JSP in Java JSTL in JSP REST API in Java JSON in Java Java Web Application Spring Framework Basics Spring Boot Tutorial Spring MVC Spring Data JPA Spring Security Spring Boot REST API Jakarta EE Basics Java Deployment JAR Deployment Java WAR Deployment Run Java as a Service Docker Java: Dockerize a Java Application Java Environment Variables and Configuration Java Logging Basics Java Production Setup Java JVM Options Java JVM Monitoring Java Hello World App Java Calculator App Java Number Guess Game Java Student Manager Java Library System Java Bank App Java Todo App Java File Manager Java Quiz App Java REST API Project Java Chat Server Java Employee Manager Java E-commerce API
Ask about this post
AI Ask about this post

Ask questions about Java Hibernate Basics: SessionFactory, Session and HQL and get answers drawn from it.

Signed-in readers only.