Category Archives: Hibernate

What are the important paradigms for Developing the Clean Object-Oriented Code?

In this blog post we will discuss about What are the important paradigms for Developing the Clean Object-Oriented Code? We should always keep in mind below key points when you write code in your application: We should use an Interface (or the Super Type) not the implementation. Classes Interacting each other should be loosely coupled among… Read More »

Hibernate hbm2ddl property

In our previous post Why to use hibernate dialect? we understood all the concept related to hibernate dialect property In this post we will talk about hibernate hbm2ddl property in detail using an example. Hibernate hbm2ddl property you can configure in your hibernate.cfg.xml as below

The possible values for hibernate.hbm2ddl.auto are: create validate update create-drop Create If the value… Read More »

Why to use hibernate dialect?

In this post we will discuss about hibernate dialect property in detail. This property tells Hibernate to generate the appropriate SQL statements for the chosen database. For Example for MySQL database we set hibernate dialect as below in hibernate config file in our example Hibernate CRUD(Create,Read,Update and Delete) example.

If you expand hibernate-core jar in your favorite IDE… Read More »

Understanding hibernate Configuration File

In previous post Dirty checking in hibernate example we learnt what dirty checking concept in hibernate. In this post we will understand most of the important properties available in hibernate.cfg.xml file Let’s take hibernate configuration file from our previous example where we have learnt about Dirty checking in hibernate hibernate.cfg.xml

First line in the above XML… Read More »

Dirty checking in hibernate example

In previous post Hibernate CRUD example in hibernate you learnt how to perform Create,Read,Update and Delete operation with database.In this post I will demonstrate about Dirty checking in hibernate example step by step using below project. Technologies and tools used for this application are – Hibernate 5.2.11.Final Eclipse Mars.2 (4.5.0) Maven 3.5.0 JavaSE 1.8 MySQL 5.5.57 Project Structure Review… Read More »

Hibernate CRUD example

In previous post Save and persist an entity example in hibernate you learnt how to save an entity object in database. This post demonstrates how to perform CRUD(Create,Read,Update and Delete) operation is hibernate step by step. Technologies and tools used for this application are – Hibernate 5.2.11.Final Eclipse Mars.2 (4.5.0) Maven 3.5.0 JavaSE 1.8 MySQL 5.5.57 Project… Read More »

Save and persist an entity example in hibernate

In Hibernate framework, an entity object can be persisted or saved into database using the following methods – save() → This method is used to save an entity object into database and returns a generated identifier or primary key. This method throws an exception if an entity already exists in the database. persist() → This method is… Read More »

what are the benefits of using hibernate?

This Post talks about what are the benefits of using hibernate? Below are the key benefits of using hibernate framework: Hibernate is an Object/Relational Mapping solution for Java programming language. The term Object Relational Mapping refers to the process of mapping data from java object model representation to a relational data base representation (and vice versa). Hibernate framework… Read More »

Hibernate 5 distribution binary details

Once you download the latest version of Hibernate distribution from http://kkjavatutorials.com/latest-hibernate-distribution-zip-file-download-link/. Once you unzip the downloaded file, You will see directory structure as shown in the following image: Now you further if you go to lib directory you will see following directory structure