Thursday, 16 February 2012

What are the different types of property and class mappings? | Java Hibernate

• Typical and most common property mapping 
<property name="description" column="DESCRIPTION" type="string"/>
Or
<property name="description" type="string">
    <column name="DESCRIPTION"/>
</property> 
• Derived properties 
<property name="averageBidAmount" formula="( select AVG(b.AMOUNT) from BID b
where b.ITEM_ID = ITEM_ID )" type="big_decimal"/>
• Typical and most common property mapping 
<property name="description" column="DESCRIPTION" type="string"/> 
• Controlling inserts and updates 
<property name="name" column="NAME" type="string"
       insert="false" update="false"/>

No comments: