Tag |
Property |
Name |
Collection property name |
Table (optional) |
It is the default property name. It is used to represent to collection table. We can not use this for one to many association |
schema(optional) |
For override to the schema declare on the root element |
Lazy (optional) |
It default true. It work for the disables the lazy fetching and specifies that the association is always eagerly fetched. It can also used to enable “extra lazy” fetching where most operation do not initilized the collection.So we can say that it is suitable for large collection |
Inverse(optional) |
It defaults false. We have to marke this collection as “inverse” end of bidirectional association. |
Cascade (optional) |
It default none. We use to enable operation to cascade to child entites. |
sort(optional) |
It specifies a sorted collection with natural sort order or a given comparator class. |
Order-by(optional) |
It use the JDK1.4 only. It specifies a table columb of columns that define the iteration order of Map, Set of bag, together with an optional asc or desc. |
Where(optional) |
This specifies an arbitary SQL WHERE condition that is used when retriving or removing the collection. This is useful if the collection needs to contain only a subset of the available data. |
fetch(optional) |
It defaults to select. We can chooses between outer join fetching, fetching by sequential select, and fetching by sequential subselect. |
Batch-size(optional) |
Detaults to 1 and it specifies a “batch size” for lazily fetching instances of this collection. |
access(optional) |
It placed defaults to the property. The strategy hibernate uses for accessing the collection property value. |
Optimistic-lock(optional) |
It set defaults on true. This specifies that changes to the state of the collection results in increments of the owing entity's version. For one to many association we want to disable this setting. |
mutable(optional) |
It defaults set on the true. Here the value of false specifies that the elements of the collection never change. This allows for minor performance optimization in some cases. |