littypreethkr wrote:
From the Discount.hbm.xml u specified remove the
<id name="productId" type="int" column="productId" >
<generator class="foreign"/>
</id>
Then your mapping is fine.
Thank you
It worked fine
Do i need to make any changes in products.hbm.xml
this is the code for products.xml
<hibernate-mapping>
<class name="products" table="products_tbl">
<id name="productId" type="int" column="productId" >
<generator class="assigned"/>
</id>
<property name="productShortName">
<column name="productShortName" />
</property>
<property name="productDescription">
<column name="productDescription"/>
</property>
<property name="unitOfMeasurement">
<column name="unitO....
..
..
I have one more problem .If you can spare 5 mins for me...it would be really great.