|
Tags for declaration of Hibernate descriptor file
Used to generate descriptor file for Hibernate
Parameter |
Type |
Applicability |
Description |
Mandatory |
jcs-cache |
text |
|
Caching option |
false |
table |
text |
|
The name of its database table. |
true
|
discriminator-value |
text |
|
A value that distiguishes individual subclasses, used for polymorphic behaviour. |
false |
mutable |
text |
|
Specifies that instances of the class are (not) mutable. |
false |
schema |
text |
|
Override the schema name specified by the root hibernate-mapping element. |
false |
proxy |
text |
|
Specifies an interface to use for proxies (JDK 1.3+ only) and lazy loading. |
false |
Defines a discriminator
Parameter |
Type |
Applicability |
Description |
Mandatory |
column |
text |
|
defaults to the property name. The name of the mapped database table column. |
false |
type |
text |
|
A name that indicates the Hibernate type. |
false |
length |
text |
|
The length of the mapped database table column. |
false |
Declare the current class as subclass
Parameter |
Type |
Applicability |
Description |
Mandatory |
discriminator-value |
text |
|
A value that distiguishes individual subclasses, used for polymorphic behaviour. |
false |
proxy |
text |
|
Specifies an interface to use for proxies (JDK 1.3+ only) and lazy loading. |
false |
Tags for declaration of Hibernate descriptor file
Defines a property
Parameter |
Type |
Applicability |
Description |
Mandatory |
column |
text |
|
defaults to the property name. The name of the mapped database table column. |
false |
type |
text |
|
A name that indicates the Hibernate type. |
false |
length |
text |
|
The length of the mapped database table column. |
false |
not-null |
bool |
|
If the column is not nullable. |
false |
unique |
bool |
|
If the column is unique. |
false |
Declares a component
Parameter |
Type |
Applicability |
Description |
Mandatory |
class |
text |
|
A fulll qualified class name. |
false |
Declares an identifier property
Parameter |
Type |
Applicability |
Description |
Mandatory |
column |
text |
|
defaults to the property name. The name of the mapped database table column. |
false |
type |
text |
|
A name that indicates the Hibernate type. |
false |
length |
text |
|
The length of the mapped database table column. |
false |
unsaved-value |
text |
|
A value that distiguishes transient instances with existing persistent state from new transient instances. |
false |
generator-class |
text |
|
The key generator class |
true
|
generator-class-param-1 |
text |
|
Parameter for key generator class. |
false |
generator-class-param-2 |
text |
|
Parameter for key generator class. |
false |
generator-class-param-3 |
text |
|
Parameter for key generator class. |
false |
Declares a version property
Parameter |
Type |
Applicability |
Description |
Mandatory |
column |
text |
|
The name of a column holding the version number. |
false |
Declares a timestamp property
Parameter |
Type |
Applicability |
Description |
Mandatory |
column |
text |
|
The name of an column holding the timestamp. |
false |
Declares a many-to-one association
Parameter |
Type |
Applicability |
Description |
Mandatory |
column |
text |
|
Defaults to the property name. The name of the mapped database table column. |
false |
class |
text |
|
Defaults to the property type determined by reflection. The name of the associated class. |
false |
cascade |
text |
|
Specifies, which operations should be cascaded from the parent object to the associated object. |
false |
not-null |
bool |
|
If the column is not nullable. |
false |
unique |
bool |
|
If the column is unique. |
false |
outer-join |
text |
|
Defaults to true. Enable outer-join fetching for this association when hibernate.use_outer_join is set. |
false |
Declares a one-to-one association
Parameter |
Type |
Applicability |
Description |
Mandatory |
class |
text |
|
Defaults to the property type determined by reflection: The name of the associated class. |
false |
cascade |
text |
|
Specifies, which operations should be cascaded from the parent object to the associated object. |
false |
outer-join |
bool |
|
Defaults to true. Enable outer-join fetching for this association when hibernate.use_outer_join is set. |
false |
Declare a toplevel collection property
Parameter |
Type |
Applicability |
Description |
Mandatory |
role |
text |
|
The name of the toplevel collection role. |
true
|
column |
text |
|
The name of table column holding the key of the toplevel collection. |
true
|
length |
text |
|
The length of the column. |
true
|
not-null |
text |
|
Enable a not null constraint. |
true
|
unique |
text |
|
Enable a unique constraint. |
true
|
cascade |
text |
|
Specifies which operations should be cascaded from the parent object to the associated object. |
false |
Defines a set
Parameter |
Type |
Applicability |
Description |
Mandatory |
role |
text |
|
The name of the toplevel collection role or nested collection property. |
true
|
readonly |
bool |
|
If readonly collection |
false |
table |
text |
|
Defaults to role name: the name of the collection table (not used for one-to-many associations) |
false |
schema |
text |
|
The name of a table schema to override the schema declared. |
false |
lazy |
bool |
|
Defaults to false: enable lazy initialization. |
false |
cascade |
text |
|
Specifies, which operations should be cascaded from the parent object to the associated object. |
false |
sort |
text |
|
Specify a sorted collection with natural sort order, or a given comparator class. |
false |
order-by |
text |
|
Specify table columns that define the iteratation order. |
false |
Defines a bag
Parameter |
Type |
Applicability |
Description |
Mandatory |
role |
text |
|
The name of the toplevel collection role or nested collection property. |
true
|
readonly |
bool |
|
If readonly collection |
false |
table |
text |
|
Defaults to role name. The name of the collection table (not used for one-to-many associations) |
false |
schema |
text |
|
The name of a table schema to override the schema declared. |
false |
lazy |
bool |
|
Defaults to false. Enable lazy initialization. |
false |
cascade |
text |
|
Specifies, which operations should be cascaded from the parent object to the associated object. |
false |
order-by |
text |
|
Specify table columns that define the iteratation order. |
false |
Defines a List
Parameter |
Type |
Applicability |
Description |
Mandatory |
role |
text |
|
The name of the toplevel collection role or nested collection property. |
true
|
table |
text |
|
Defaults to role name. The name of the collection table (not used for one-to-many associations) |
false |
schema |
text |
|
The name of a table schema to override the schema declared. |
false |
lazy |
bool |
|
Defaults to false. Enable lazy initialization. |
false |
cascade |
text |
|
Specifies which operations should be cascaded from the parent object to the associated object. |
false |
Defines a map
Parameter |
Type |
Applicability |
Description |
Mandatory |
role |
text |
|
The name of the toplevel collection role or nested collection property. |
true
|
table |
text |
|
Defaults to role name. The name of the collection table (not used for one-to-many associations) |
false |
schema |
text |
|
The name of a table schema to override the schema declared. |
false |
lazy |
bool |
|
Defaults to false. Enable lazy initialization. |
false |
cascade |
text |
|
Specifies which operations should be cascaded from the parent object to the associated object. |
false |
sort |
text |
|
Specify a sorted collection with natural sort order, or a given comparator class. |
false |
order-by |
text |
|
Specify table columns that define the iteratation order. |
false |
Defines an array
Parameter |
Type |
Applicability |
Description |
Mandatory |
role |
text |
|
The name of the toplevel collection role or nested collection property. |
true
|
table |
text |
|
Defaults to role name. The name of the collection table (not used for one-to-many associations) |
false |
schema |
text |
|
The name of a table schema to override the schema declared. |
false |
cascade |
text |
|
Specifies which operations should be cascaded from the parent object to the associated object. |
false |
Defines a primitive-array
Parameter |
Type |
Applicability |
Description |
Mandatory |
role |
text |
|
The name of the toplevel collection role or nested collection property. |
true
|
table |
text |
|
Defaults to role name. The name of the collection table (not used for one-to-many associations) |
false |
schema |
text |
|
The name of a table schema to override the schema declared. |
false |
cascade |
text |
|
Specifies which operations should be cascaded from the parent object to the associated object. |
false |
Declares a collection key
Parameter |
Type |
Applicability |
Description |
Mandatory |
column |
text |
|
Defaults to the property name. The name of the mapped database table column. |
false |
type |
text |
|
A name that indicates the Hibernate type. |
false |
length |
text |
|
The length of the mapped database table column. |
false |
generator-class |
text |
|
The key generator class (toplevel collections only) |
true
|
generator-class-param-1 |
text |
|
Parameter for key generator class. |
false |
generator-class-param-2 |
text |
|
Parameter for key generator class. |
false |
generator-class-param-3 |
text |
|
Parameter for key generator class. |
false |
Declares a collection index
Parameter |
Type |
Applicability |
Description |
Mandatory |
column |
text |
|
defaults to the property name. The name of the mapped database table column. |
false |
type |
text |
|
A name that indicates the Hibernate type. |
false |
length |
text |
|
The length of the mapped database table column. |
false |
Declares a collection element
Parameter |
Type |
Applicability |
Description |
Mandatory |
column |
text |
|
The name of the mapped database table column. |
false |
type |
text |
|
A name that indicates the Hibernate type. |
false |
length |
text |
|
The length of the mapped database table column. |
false |
Declares a composite collection element
Parameter |
Type |
Applicability |
Description |
Mandatory |
class |
text |
|
The name of the element class. |
true
|
Declares a many-to-many relationship
Parameter |
Type |
Applicability |
Description |
Mandatory |
column |
text |
|
The name of the mapped database table column. |
false |
class |
text |
|
Full qualified class name |
false |
Declares a one-to-many relationship
Parameter |
Type |
Applicability |
Description |
Mandatory |
class |
text |
|
Fully qualified class name for the collection contens |
false |
|