Home » Author Archives: Yatin (page 20)

Author Archives: Yatin

Yatin
The author is graduated in Electronics & Telecommunication. During his studies, he has been involved with a significant number of projects ranging from programming and software engineering to telecommunications analysis. He works as a technical lead in the information technology sector where he is primarily involved with projects based on Java/J2EE technologies platform and novel UI technologies.

Hibernate Get Example

Hibernate Session provide different methods to fetch data (or a single record) from the database. Two of them are – get() and load(). The functionality is similar but there is a difference between the ways they work. In this tutorial, we will demonstrate the use of get() method in Hibernate using annotation based configuration.             ...

Read More »

Hibernate Transaction Example

A Transaction is a sequence of operation which works as an atomic unit. A transaction only completes if all the operations completed successfully. A transaction has the Atomicity, Consistency, Isolation, and Durability properties (ACID). In this tutorial, we are going to talk about the basics of Hibernate Transactions and Sessions.               1. Introduction 1.1 ...

Read More »

Hibernate Exception Handling Example

This tutorial deals with some of the errors that developers get, while working with Hibernate. Along with the exception or error messages themselves, potential causes of these errors are often listed along with links to additional resources. In this tutorial, we will discuss the Hibernate exceptions.               1. Introduction 1.1 Hibernate Object-Relational Mapping or ...

Read More »

Hibernate CRUD Operations Tutorial

A CRUD operation deals with creating, retrieving, updating, and deleting records from the table. In this tutorial we will see how it is done using Hibernate annotations. We are going to discuss 4 main functionalities: Creating a Record Displaying Records Updating a Record Deleting a Record       Table Of Contents 1. Introduction 1.1 Hibernate 1.2 CRUD 1.3 Download ...

Read More »

Hibernate Maven Example

This tutorial is a part of the Hibernate introduction series and is useful in getting started with the Hibernate. We used JDK, Eclipse IDE and Maven build tool. This quick guide will show you how to use Maven to generate a simple Java project, and uses Hibernate to insert a record into the MySQL database.           ...

Read More »

Hibernate Batch Processing Example

Hibernate Batch processing is an easy way to add multiple statements into a batch and execute that batch by making a single round trip to the database. This tutorial shows how to create batch insert and batch update statements using JPA and Hibernate. JDBC offers support for Batching together SQL statements that can be represented as a single PreparedStatement.   ...

Read More »

Hibernate Best Practices Tutorial

Hibernate is by far the most popular JPA implementation. This popularity brings several advantages for all users. There are lots blog posts about it, questions and answers on popular forums and well-established best practices. In this tutorial, we will summarize some of the best practices for JPA and Hibernate which will help developers avoid common issues and to create better ...

Read More »

Hibernate One to One Example

In simple terms, a One-to-One Association is similar to Many-to-One association with a difference that the column will be set as unique i.e. Two entities are said to be in a One-to-One relationship if one entity has only one occurrence in the other entity. For example, an address object can be associated with a single employee object. However, these relationships ...

Read More »

Hibernate One to Many Example

One-to-Many mapping means that one row in a table can be mapped to multiple rows in another table but multiple rows can be associated with only one instance of the first entity. It is 1-to-n relationship. For example, in any company, an employee can register multiple bank accounts but one bank account will be associated with one and only one ...

Read More »

Hibernate Many to Many Example

Many-to-Many mapping is usually implemented in the database using a Join Table. For example, we can have Cart and Item tables and Cart_Items table for many-to-many mapping. Every cart can have multiple items and every item can be part of multiple carts, so we have a many to many mapping here. In this tutorial, we will learn about how to ...

Read More »