Specifies which operations should be cascaded from the parent object to the associated object. Valid options are:any|none|save-update|delete|all-delete-orphan
false
table
The relationship collection table name (not used for one-to-many associations)
false
schema
Table schema to override the default schema declared on the root element
Determines if this is a lazy loading relationship true
false
cascade
Specifies which operations should be cascaded from the parent object to the associated object. Valid options are:any|none|save-update|delete|all-delete-orphan
false
inverse
Indicates if this collection is the inverse collection of a bi-directional relationship
false
schema
Table schema to override the default schema declared on the root element
false
order-by
(optional, JDK1.4 only) specify a table column (or columns) that define the iteration order of the Map, Set or bag, together with an optional asc or desc
Note: unsaved-value An identifier property value that indicates that an instance * is newly instantiated (unsaved), distinguishing it from transient instances that * were saved or loaded in a previous session. If not specified you will get an exception like this: * another object associated with the session has the same identifier * * @hibernate.id generator-class="" type="${return_type}" column="${enclosing_type}_ID" * unsaved-value="null" length="" * @return ${return_type}
Parameter
Description
Mandatory
column
(optional - defaults to the property name): The name of the primary key column.
false
type
The Hibernate type
false
length
The length of the field
false
unsaved-value
unsaved-value (optional - defaults to null): An identifier property value that indicates that an instance is newly instantiated (unsaved), distinguishing it from transient instances that were saved or loaded in a previous session. values - any
false
generator-class
Names a Java class used to generate unique identifiers for instances of the persistent class. Valid values: increment
(optional - defaults to property name) the name of the collection table (not used for one-to-many associations)
false
lazy
(optional - defaults to false) enable lazy initialization (not used for arrays)
false
cascade
(optional - defaults to none) enable operations to cascade to child entities
false
schema
(optional) the name of a table schema to override the schema declared on the root element
false
sort
(optional) specify a sorted collection with natural sort order, or a given comparator class
false
order-by
(optional, JDK1.4 only) specify a table column (or columns) that define the iteration order of the Map, Set or bag, together with an optional asc or desc
(optional - defaults to the property type determined by reflection): The name of the associated class.
false
cascade
(optional): Specifies which operations should be cascaded from the parent object to the associated object.
false
outer-join
(optional - defaults to auto): enables outer-join fetching for this association when hibernate.use_outer_join is set.
false
update, insert
(optional - defaults to true) specifies that the mapped columns should be included in SQL UPDATE and/or INSERT statements. Setting both to false allows a pure "derived" association whose value is initialized from some other property that maps to the same colum(s) or by a trigger or other application.
the name of the property, with an initial lowercase letter.
false
table
The name of the association table
false
sort
The fully qualified comparator class (optional)
false
inverse
Indicates if this collection is the inverse collection of a bi-directional relationship
false
cascade
Specifies which operations should be cascaded from the parent object to the associated object. Valid options are:any|none|save-update|delete|all-delete-orphan
false
lazy
(optional - defaults to false) enable lazy initialization (not used for arrays)
false
schema
schema (optional) the name of a table schema to override the schema declared on the root element