Home » Enterprise Java » hibernate

hibernate

Hibernate doReturningWork() method Example

In this tutorial, we will learn Hibernate 4 Returning Work interface and Session.doReturningWork() method for Jdbc. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a Java-based ORM tool that provides the framework for mapping application domain objects to the relational database tables and vice versa. ...

Read More »

Hibernate doWork() method Example

In this tutorial, we will learn Hibernate 4 Work interface and Session.doWork() method for Jdbc. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a Java-based ORM tool that provides the framework for mapping application domain objects to the relational database tables and vice versa. It ...

Read More »

Hibernate CascadeType.PERSIST Example

Greeting readers, in this tutorial, we will create two entity classes related to each other and we will perform the cascading operations between them. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a Java-based ORM tool that provides the framework for mapping application domain objects ...

Read More »

Hibernate CascadeType.REMOVE Example

Greeting readers, in this tutorial, we will create two entity classes related to each other and will perform the cascading operations between them. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a Java-based ORM tool that provides the framework for mapping application domain objects to ...

Read More »

Hibernate Optimistic Locking Example

In hibernate, Locking represents a mechanism to safeguard the records that can be simultaneously accessed to avoid the concurrency errors (i.e. when multiple users simultaneously update the records resulting in inconsistencies). Hibernate has two types of locking mechanisms i.e. Optimistic locking Pessimistic locking In this tutorial, we will explore the optimistic locking mechanism in the hibernate framework. 1. Introduction Object-Relational ...

Read More »

Hibernate Calling Stored Procedure Example

Stored Procedures are a set of compiled SQL statements residing in the database. In hibernate; there are three different approaches to call a stored procedure i.e. Query interface – createSQLQuery(. . . .); StoredProcedureQuery interface – createStoredProcedureQuery(. . . .); @NamedNativeQuery annotation In this tutorial, we will explore how to create a simple stored procedure in the MySQL database and ...

Read More »

Hibernate DateTime Mapping Example

In hibernate; @Temporal annotation is used to store java.sql.Time, java.sql.Date or java.sql.Timestamp in the database. In this tutorial, we will explore how to work with Timestamp using the xml and annotation configurations in the Hibernate framework. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a ...

Read More »

Hibernate Manual and Always flush modes Example

In hibernate; flushing strategy is a process that controls how many times hibernate hits the database when it comes to writing operations. In this tutorial, we will explore the Always and Manual flushing strategies of the Hibernate framework. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate ...

Read More »

Hibernate FlushMode Commit Example

In hibernate; flushing strategy is a process that controls how many times hibernate hits the database when it comes to writing operations. In this tutorial, we will explore the default flush strategy of the Hibernate framework. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a ...

Read More »

Hibernate Projections Tutorial

In hibernate; developers can implement the Projection interface to read the partial entity or entities from the relational database. In this tutorial, we will explore the use of Projection interface available in the org.hibernate.criterion package of the Hibernate framework.                     Table Of Contents 1. Introduction 1.1 Hibernate Annotations 1.2 Hibernate Criteria ...

Read More »