HI Jayachandra,
You're many-to-one mapping is correct, however you've got a small error with the next line, which should be mapping the BID_NAME column from the BID table to the name property in your Bid class. This gives you a bid.hbm.xml mapping file as follows:
Code:
<hibernate-mapping>
<class name="com.hibernateproject.bean.Bid" table="jayachandra.BID" >
<id name="bidId" type="int" column="BID_ID" >
</id>
<many-to-one name="item" column="ITEM_ID" class="com.hibernateproject.bean.Item" not-null="true"/>
<property name="name" type="java.lang.String" column="BID_NAME" />
</class>
</hibernate-mapping>
By default hibernate will pick up the id entity in the corresponding Item.hbm.xml mapping file.
Hope this helps
Andy