2. Hibernate Configuration

A very simple Hibernate configuration mapping the PERSON table to the Person class.

                
<?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">

<hibernate-mapping package="org.springbyexample.orm.hibernate3.bean" default-access="field">

    <class name="Person" table="PERSON">
        <id name="id" column="ID">
            <generator class="native"/>
        </id>

        <property name="firstName" column="FIRST_NAME" />
        <property name="lastName" column="LAST_NAME" />
    </class>

</hibernate-mapping>