-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: hibernate mapping problem
PostPosted: Fri Feb 17, 2006 1:15 am 
Newbie

Joined: Mon Apr 04, 2005 11:10 pm
Posts: 6
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.