Hi
I've table with id, appid and some more columns
ID here is this table ID which increments by default. whereas appid is the one whoch has one-tomany relationship with otehr tables
my hbm.xml is like this while reading data it's ok but while writing data I'm getting error as hsql created tried to set ID which is automatically generated key. Can somebody pelase help me.
Table a hbm.xml
Code:<hibernate-mapping> <class name="AccountOpenVO" table="ACCOPEN"> <id name="appid" column="appid" type="java.lang.Integer" unsaved-value="null"> </id> <property name="Id" column="id" type="java.lang.Integer" not-null="true" /> <set name="customers" table="ACCCUST" lazy="false"> <key column="dia_accopenid" /> <one-to-many class="AccountCustVO" /> </set> <set name="products" table="ACCPROD" lazy="false"> <key column="dia_accopenid" /> <one-to-many class="AccountProdVO" /> </set> <property name="runno" column="runind" type="java.lang.Integer" not-null="true"/> </class>


Reply With Quote
