Spring Hibernate Integration Example Tutorial (Spring 4 + Hibernate 3 and Hibernate 4)

Spring is one of the most used Java EE Framework and Hibernate is the most popular ORM framework. That’s why Spring Hibernate combination is used a lot in enterprise applications. Recently I have written a….

Hibernate SessionFactory

Hibernate SessionFactory is the factory class through which we get sessions and perform database operations. Hibernate SessionFactory Hibernate SessionFactory provides three methods through which we can get Session object – getCurrentSession(), openSession() and openStatelessSession(). Hibernate….

Hibernate Session merge, update, save, saveOrUpdate, persist example

Hibernate Session is the interface between java application and hibernate framework. Today we will look into Session important methods for saving and updating data in tables – save, saveOrUpdate, persist, update and merge. Hibernate Session….

[Solved] org.hibernate.AnnotationException: No identifier specified for entity Class

Recently I was working on a hibernate project and I have added few entity beans, when executed I got below exception stack trace. Initial SessionFactory creation failed.org.hibernate.AnnotationException: No identifier specified for entity: com.journaldev.hibernate.model.Address org.hibernate.AnnotationException: No….

Hibernate Session get() vs load() difference with examples

Hibernate Session provide different methods to fetch data from database. Two of them are – get() and load(). There are also a lot of overloaded methods for these, that we can use in different circumstances…..

Hibernate Named Query Example – @NamedQuery

Welcome to Hibernate Named Query Example Tutorial. We saw how we can use HQL and Native SQL Query in Hibernate. If there are a lot of queries, then they will cause a code mess because….

Hibernate Native SQL Query Example

Welcome to the Hibernate Native SQL Query example tutorial. We looked into Hibernate Query Language and Hibernate Criteria in earlier articles, today we will look into Hibernate Native SQL query with examples. Hibernate SQL Query….

Hibernate Log4j Logging

Welcome to Hibernate Log4j Logging example. Hibernate 4 uses JBoss logging rather than slf4j in older hibernate versions. Today we will look into how to configure log4j in a hibernate application. Hibernate Log4j Logging Create….

Hibernate EHCache – Hibernate Second Level Cache

Welcome to the Hibernate Second Level Cache Example Tutorial. Today we will look into Hibernate EHCache that is the most popular Hibernate Second Level Cache provider. Hibernate Second Level Cache One of the major benefit….

Hibernate Caching – First Level Cache

Welcome to Hibernate Caching – First Level Cache Example Tutorial. Recently we looked into Hibernate architecture, hibernate mapping and how to use HQL for firing SQL queries in object oriented way. Today we will look….

Generic selectors
Exact matches only
Search in title
Search in content