Mapping a class more than once: In hibernate every thing is possible to provide more than one mapping for a particular persistent class. We found in this case we need to specify an entity name to disambiguate between instances of the two mapped entites. In hibernate By default entity name is the same as the class name and Hibernate specify the entity name when working with persistent objects, it done when we writing queries, or mapping association to the named entity.
For Example:
<class name="Camera" table="Cameras" entity-name="CurrentCamera"> ...
<set name="history" inverse="true" order-by="effectiveEndDate desc">
<key column="currentCameraId"/>
<one-to-many entity-name="HistoricalCamera"/>
</set>
</class>
<class name="Camera" table="CameraHistory" entity-name="HistoricalCamera"> ...
<many-to-one name="currentCamera" column="currentCameraId" entity-name="CurrentCamera"/>
</class>
Here we defined the Associations using entity-name instead of class.