Element Description
hibernate-mapping The root element
Attributes: schema and package
Subelements: class
class Specifies the JavaBean class to map to a database table
Attributes: table, schema
Subelements: id, property, set, and list
id Required element in a class definition
Attributes: column, type, and length
Subelements: column, generator
property Specifies a JavaBean property and the corresponding database table column
Attributes: type, column, length, and not-null
Subelements: column

Table 2 Mapping File Elements The mapping file includes these elements and attributes.