Browsing articles in "hibernate"
Jun
10
2016

Most important java/JEE interview question and concept

In this post of java tutorial we will see some of most important java interview question. These questions are asked most frequently. Although question may vary depending on the interviewer , experience level and job profile but these are some basic question that you may face.  These questions are mixed from core java, java concept, […]

Sep
6
2015

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 […]

May
24
2015

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 […]

May
23
2015

org.hibernate.AnnotationException: No identifier specified for entity

what is hibernate

Hi in this post we will see one more exception that occur because some time we forgaet to mention which field in our entity class will be primary key column. To remove this exception we need to tell hibernate which propery of entity class will be out primary key column. Let see simple example how […]

May
23
2015

org.hibernate.id.Identifier 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 […]

Continue Reading »
Author An article by devender kumar Comments Comments Off on org.hibernate.id.Identifier GenerationException: ids for this class must be manually assigned before calling save()
Apr
30
2015

CascadeType Example in hibernate and org.hibernate.TransientObjectException

many to one relatioship dept and course

Hi in this post of hibernate i will describe one more feature of hibernate. Let say we have some one to many realtion like below. In this relationship Course have many department. Let say each couurse have fifteen deparment. Then whenever i save a new course entity i need to save all the related deparment […]

Apr
15
2015

Example One to many and many to one mapping and mappedBy

many to one relatioship dept and course

One to many relationship In this post we will see about one to many . In this  scenario imagine that one student can opt more than one course. Another example we can take student and instructor relationship . One instructor can advise many student. Another example that we will see in this post is course […]

Apr
13
2015

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 […]

Apr
12
2015

proxy object and Lazy and Eager initialization in hibernate

proxy object and lazy and eager initialization

In this tutorial i will explain what proxy object ,how hibernate support proxy object,what is lazy and eager fetch strategy that hibernate support. First of all have a look in below scenario .Let suppose we each university have many collages associated with it.Now while we fetch a particular university data then do all the associated […]

Pages:12»