Browsing articles in "hibernate"
Apr
10
2015

configuring collection and adding key to collection object

Proxy object ,lazy and eager initialization

In this post we will see how we can configure collection table name, how to change column name of collection table and how to add primary key to this table to identify each record separately. As we have seen in Saving collection of embedded object inside entity class that hibernate uses default name for collection table. Here […]

Apr
9
2015

Saving collection of embedded object inside entity class

Proxy object ,lazy and eager initialization

In last post of hibernate tutorial AttributeOverrides of value object and Embedded Object as primary Keys we saw how to save more than one embedded object inside entity object and how to make Composite-id. In this post we will see how to save collection of object. Let suppose we want to save collages that come under different universities. […]

Apr
7
2015

AttributeOverrides of value object and Embedded Object as primary Keys

In last post we saw how to use embedded object. In this post we will see some advance tweak in embedded object. Here is case when we need to make tweak in embedded object. Let suppose one student can enroll in multiple courses then relation between student and course will look like thisIn this case […]

Apr
6
2015

Embedding value object inside Entity object

value object and entity object

In this post of hibernate tutorial we will look at how to embed a value object inside an entity object.What is a value object and what is a entity object. Value object and entity object A value object is an object that does not have meaning of its own.For example a course object does not […]

Sep
11
2014

How To Store Array In database in a single column Using Hibernate

In many situation we may need to store an Array as a single element in database.In this tutorial we will see how we can store an array in database as a single element. With Hibernate it is very simple .Let say we have a table ArrayClass and we have a column (let say arr) in […]

Apr
2
2014

hibernate web application example

This is simple example of login and registration using hibernate with jsp.Although it is self explanatory but still i have explain every step . Open eclipse > New project >Others >Web >Dynamic Web Project   Give your project name >Select  Target Runtime > Next > Finish   Before begin with the program you need to […]

Mar
23
2014

Simple hibernate program

hibernate example

This is simple hibernate example of desktop application .Add the hibernate jar  by creating new library named as hibernate and also add your database jdbc driver jar as external jar. Also add the hibernate.cfg.xml file in your src folder. Note hibernate.cfg.xml file should not be inside package.it should be in in parallel to packages. The directory […]

Mar
11
2014

What is hibernate

what is hibernate

Hibernate is an ORM tool.It is used to persist data in database. There are lot of feature that have been added in hibernate over the years . But when it was started its primarily goal was to persist data in the database. All the feature have been covered in next few post. Let’s assume we […]

Mar
10
2014

How to install hibernate

How to install hibernate

To setup the development environment to write the code that uses hibernate framework there are few step – Download the require jar files of hibernate from official site of hibernate or from the following link Download require jar files of hibernate Step 1 Add these jar files into your class path as follow Create project […]

Pages:«12