Setting hibernate configurations, Hibernate.cfg.xml – HP Integrity NonStop J-Series User Manual

Page 212

Advertising
background image

length="15"
column="lname"/>

<property name="age" column="age" />

</class>

</hibernate-mapping>

NOTE:

The generator class for tag <id> is increment. This is to use the auto-increment

feature of Hibernate.

Setting Hibernate Configurations

To set up Hibernate configurations, create the following files:

hibernate.cfg.xml

hibernate.properties

hibernate.cfg.xml

Hibernate uses the hibernate.cfg.xml file to set up the environment.

To create and modify hibernate.cfg.xml:
1.

Create the hibernate.cfg.xml file in the EmployeeInfo/src directory, as explained
in

“Creating the Hibernate Mapping File” (page 209)

.

212

Getting Started with Hibernate

Advertising
This manual is related to the following products: