Hibernate

Mapping the Emp Object to the Database Emp table
Previous Home Next

Step 3:

Mapping the Emp Object to the Database Emp table.The file Emp.hbm.xml is used to map Emp Object to the Emp table in the database. Here is the code for

Emp.hbm.xml:

<?xml version='1.0' 
encoding='UTF-8'?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate
/Hibernate Mapping DTD 3.
0//EN" "
http://hibernate.
sourceforge.net/
hibernate-mapping-3.0.
dtd"
>
<!-- Generated by MyEclipse Hibernate Tools.-->
<hibernate-mapping>
<class name="r4r.Emp" >
<id name="id"  type="int">
<generator class="increment" />
</id>
<property name="name" />
<property name="job" />
<property name="salary" type="int"/>
</class>
   </hibernate-mapping>
Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: