Browsing articles in "hibernate"

pagination example in hibernate

google search pagination example

In this article we will pagination example with hibernate . In application that uses large data it is always good practice to use pagination. Like in google search we see only first 10 search record on each page like this This offer benefit that the search time is less as getting ten record take less time […]


difference between session.get() and session.load() method in hibernate

Difference between session.get and session.load method

In this post of hibernate we will see difference betwwen the two methods of fetching record from database. We will see difference between session.get() and session.load() method of fetching single record from DB. This is important question from interview prospective also. He basic difference in these two approaches is that session.get() method fetch record from […]

2015 GenerationException: ids for this class must be manually assigned before calling save()

what is hibernate

In this post of hibernate we will see one more exception that often occure because some time we forget to specify genration stretagy of primary key column for record in Entity class and neither we give it manually. Here is simple example of student entity class we are trying to save without specifying genration stretagy of primary […]


Example One to one mapping

one to one mapping

In this tutorial i will explain how establish relationship between two entity object. In last tutorials we have seen how to save entity object when there is a value object inside entity object or collection of value object inside entity object. In this tutorial we will learn how to establish one to one relationship between two […]