Code:
<class name="adjuvant.poa.businessobjects.PatientAssessment"
table="PatientAssessments">
<id name="id">
<generator class="identity" />
</id>
<many-to-one name="patient" column="PatientId"
class="adjuvant.poa.businessobjects.Patient" not-null="true" />
<component lazy="false" name="labWork"
class="adjuvant.poa.businessobjects.sections.LabWork">
<component name="hemoGlobin" insert="false" update="false"
class="adjuvant.poa.businessobjects.poatypes.LabWorkType">
<property name="dateOfInvestigation"
type="java.util.Date" />
<property name="result" />
<property name="normal" type="java.lang.Boolean" />
</component>
<component name="platelets" insert="false" update="false"
class="adjuvant.poa.businessobjects.poatypes.LabWorkType">
<property name="dateOfInvestigation"
type="java.util.Date" />
<property name="result" />
<property name="normal" type="java.lang.Boolean" />
</component>
<component name="na" insert="false" update="false"
class="adjuvant.poa.businessobjects.poatypes.LabWorkType">
<property name="dateOfInvestigation"
type="java.util.Date" />
<property name="result" />
<property name="normal" type="java.lang.Boolean" />
</component>
<component name="ktype" insert="false" update="false"
class="adjuvant.poa.businessobjects.poatypes.LabWorkType">
<property name="dateOfInvestigation"
type="java.util.Date" />
<property name="result" />
<property name="normal" type="java.lang.Boolean" />
</component>
<component name="urea" insert="false" update="false"
class="adjuvant.poa.businessobjects.poatypes.LabWorkType">
<property name="dateOfInvestigation"
type="java.util.Date" />
<property name="result" />
<property name="normal" type="java.lang.Boolean" />
</component>
<component name="creatinine" insert="false" update="false"
class="adjuvant.poa.businessobjects.poatypes.LabWorkType">
<property name="dateOfInvestigation"
type="java.util.Date" />
<property name="result" />
<property name="normal" type="java.lang.Boolean" />
</component>
<component name="glucose" insert="false" update="false"
class="adjuvant.poa.businessobjects.poatypes.LabWorkType">
<property name="dateOfInvestigation"
type="java.util.Date" />
<property name="result" />
<property name="normal" type="java.lang.Boolean" />
</component>
<component name="INR" insert="false" update="false"
class="adjuvant.poa.businessobjects.poatypes.LabWorkType">
<property name="dateOfInvestigation"
type="java.util.Date" />
<property name="result" />
<property name="normal" type="java.lang.Boolean" />
</component>
<component name="APTTRatio" insert="false" update="false"
class="adjuvant.poa.businessobjects.poatypes.LabWorkType">
<property name="dateOfInvestigation"
type="java.util.Date" />
<property name="result" />
<property name="normal" type="java.lang.Boolean" />
</component>
</component>
</class>
when i load patient asssessment for the first time evry thing goes ok , but on second insertion and second load i get labwork class null
and how hibernate mannage dupicate column names
i also tried like this but always get a serialization error
Code:
<component lazy="false" name="labWork"
class="adjuvant.poa.businessobjects.sections.LabWork">
<property name="hemoGlobin"
type="adjuvant.poa.businessobjects.poatypes.LabWorkType" />
<property name="platelets"
type="adjuvant.poa.businessobjects.poatypes.LabWorkType" />
<property name="na"
type="adjuvant.poa.businessobjects.poatypes.LabWorkType" />
<property name="ktype"
type="adjuvant.poa.businessobjects.poatypes.LabWorkType" />
<property name="urea"
type="adjuvant.poa.businessobjects.poatypes.LabWorkType" />
<property name="creatinine"
type="adjuvant.poa.businessobjects.poatypes.LabWorkType" />
<property name="glucose"
type="adjuvant.poa.businessobjects.poatypes.LabWorkType" />
<property name="INR"
type="adjuvant.poa.businessobjects.poatypes.LabWorkType" />
<property name="APTTRatio"
type="adjuvant.poa.businessobjects.poatypes.LabWorkType" />
</component>
please help me out guys