Tag |
Declaration |
Name (optional) |
We use here java class nae of the persistent class or interfaces. When we miss this attribute then it assumed that the mapping is for a non-POJO entity. |
table(optional) |
It is defaults to the class name. And it is the database table name also. |
Discriminator-value(optional) |
It defaults to the class name. Here a value that distinguises individual subclasses that is used for polymorphic behavior. Here acceptable values include null and not null. |
mutable(optional) |
It is defaults true. It specifies that instances of the class are not mutable. |
schema(optional) |
It overides the schema name specified by the root <hibernate-mapping> element. |
catalog(optional) |
It overrides the schema name specified by the root <hibernate-mapping> element. |
proxy(optional) |
It specifies an interfaces to use for lazy initilizing proxies. Than we can specifies the name of the class itself. |
Dynamic-update(optional) |
It is defaults on the false. It specifies that UPDATE SQL should be generated at runtime and can contain only those columns whose values have changed. |
Dynamic-insert(optional) |
It is defaults false. It specifies that the INSERT SQL should be generated at runtime and contain only the column whose values are not null. |
Select-before-update(optional) |
It is defaults false. It specifies that hibernate should never perform an SQL UPDATE UNLESS it is certain that an object is actually modified. Only when a transient objectttt has been associated with a new session using update(), that will hibernate perform an extra SQL SELECT TO determine if an UPDATE is actually required. |
polymorphism(optional) |
It defaults to implicit. It determine whether implicit or explicit query in the polymorphism is used. |
where(optional) |
It specifies an arbitary SQLWHERE condition to be used when retrieving objects of this class. |
persister(optional) |
It specifies a custom ClassPersister. |
Batch-size(optional) |
It defaults on 1. it specifiest a “batch-size” for fetching instances of this class by identifier. |
Optimistic-look(optional) |
It defaults to version. It determines the optimistic locking strategy. |
Entity-name(optional) |
It defaults name is class name. Hibernate3 allows a class to be mapped multiple times, potentially to different tables. It also allows entity mappings that are represented by Maps or XML at the Java level. In these cases, you should provide an explicit arbitrary name for the entity. See Section 4.4, “Dynamic models” and Chapter 18, XML Mapping for more information. |
check (optional) |
SQL expression used to generate a multi-row check constraint for automatic schema generation. |
rowid (optional) |
ibernate can use ROWIDs on databases. On Oracle, for example, Hibernate can use the rowid extra column for fast updates once this option has been set to rowid. A ROWID is an implementation detail and represents the physical location of a stored tuple. |
subselect (optional) |
maps an immutable and read-only entity to a database subselect. This is useful if you want to have a view instead of a base table. See below for more information. |
abstract (optional) |
it is used to mark abstract superclasses in <union-subclass> hierarchies |