0% found this document useful (0 votes)
5 views1 page

Untitled 4

This document outlines the steps to develop a Hibernate application for saving an object to a database. It includes software setup requirements, creating a database table, setting up a Java project in Eclipse, and developing necessary resource files such as configuration and mapping files. Finally, it instructs to run a client application to test the functionality of saving an object to the database.

Uploaded by

viveksingh817298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Untitled 4

This document outlines the steps to develop a Hibernate application for saving an object to a database. It includes software setup requirements, creating a database table, setting up a Java project in Eclipse, and developing necessary resource files such as configuration and mapping files. Finally, it instructs to run a client application to test the functionality of saving an object to the database.

Uploaded by

viveksingh817298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Developing first hibernate app(Saving Object)

------------------
Saving object- inserting record in db table by collecting the data of the object

Software setup
----------------------
JDK 1.8
hibernate 5.x-> 5.1.0
OrCLE 10G
ECLIPSE IDE

STEP1: CREATE DB TABLE IN DB SW


CREATE EMPLOYEE(EID(INT) PRIMARY KEY, FIRSTNAME VARCHAR(20), LASTNAME VARCHAR(20),
EMAIL

STEP2: create java project in eclipse and hibernate jar files aand ojdbc14.jar or
mysqlconnector.jar to the build path of the project

STEP3: develop resource as shown below


HBProj1
--------------src
|----------------com.vs.cfgs

|-------------------------hibernate.cfg.xml (HB cfg file to interact with db)

|-------------------------Employee.hbm.xml (HB mapping file to map Objects


with table)
|----------------com.vs.domain

|---------------------------Employee.java (Domain/BO class- POJO(java bean -


having getter and setter methods) ; generally same name as of mapping file name)
|-----------------com.vs.test

|--------------------------SaveObjectTest.java (Client app to db s/w having


HB persistent file)

STEP4: Run the client app(test)

You might also like