Hi,
Registries.hbm.xml mapping file work fine will inserting and
updating the record , but gives problem will retrieving Objects.
Explanation : -
It gives me trouble at two point while loading TCx1PtsiteT
object .
1. while loading TA3PatientT object using TCx1PtsiteT
object .
Description :- In database Tables TA3PatientT and
TCx1PtsiteT have one-to-one relationship on Composite Id
TCx1PtsiteT have many-to-one relationship
with TCx1ParticipantM & TCx1PatientT
Here i get the following Exception
SEVERE: IllegalArgumentException in class:
com.ge.med.registries.acc_30.hibernate.TA3PatientT, getter method of property:
participant
2. while loading TCx1AdmdisT object using TCx1PtsiteT
object .
Description :- Table = TCx1AdmdisT have many-to-one
relationship with TCx1PtsiteT
On column Participant_ID and PatID.
Here i get the following Exception
SEVERE: SQLException initializing collection
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter
binding(s).
In hbm I have defined like this:-
<class name="com.ge.med.registries.acc_30.hibernate.TCx1PtsiteT"
table="T_CX1_PtSite_T">
<composite-id unsaved-value="any" >
<key-many-to-one name="Participant"
class="com.ge.med.registries.acc_30.hibernate.TCx1ParticipantM"
column="Participant_ID"/>
<key-many-to-one name="Patient"
class="com.ge.med.registries.acc_30.hibernate.TCx1PatientT" column="PatID"/>
</composite-id>
<one-to-one name="accPatient"
class="com.ge.med.registries.acc_30.hibernate.TA3PatientT" constrained="true"
outer-join="false"/>
<bag name="admParticipant" inverse="true" lazy="true"
cascade="all">
<key column="Participant_ID"/>
<one-to-many
class="com.ge.med.registries.acc_30.hibernate.TCx1AdmdisT"/>
</bag>
<bag name="admPatient" inverse="true" lazy="true"
cascade="all">
<key column="PatID"/>
<one-to-many
class="com.ge.med.registries.acc_30.hibernate.TCx1AdmdisT"/>
</bag>
</class>
<class name="com.ge.med.registries.acc_30.hibernate.TA3PatientT"
table="a3.T_A3_Patient_T">
<composite-id unsaved-value="any">
<key-property name="participant" type="string"
column="Participant_ID"/>
<key-property name="patient" type="integer"
column="PatID"/>
</composite-id>
<one-to-one name="ptSite"
class="com.ge.med.registries.acc_30.hibernate.TCx1PtsiteT" constrained="true"
outer-join="false"/>
<property name="race" column="Race" type="short" length="5"/>
</class>
<class name="com.ge.med.registries.acc_30.hibernate.TCx1AdmdisT"
table="T_CX1_AdmDis_T">
<id name="primary" column="Admission_ID" type="long"
unsaved-value="null">
<generator class="native"/>
</id>
<property name="admitdt" column="AdmitDt" type="timestamp"
length="23" not-null="true"/>
<property name="dischdt" column="DischDt" type="timestamp"
length="23"/>
<property name="patient" column="PatID" type="integer" />
<property name="participant" column="Participant_ID"
type="string" length="50"/>
<one-to-one name="accAdmDis"
class="com.ge.med.registries.acc_30.hibernate.TA3AdmdisT" constrained="true"
outer-join="false" />
<bag name="labVisit" inverse="true" lazy="true" cascade="all">
<key column="Admission_ID"/>
<one-to-many
class="com.ge.med.registries.acc_30.hibernate.TCx1LabvisitT"/>
</bag>
</class>
Help me out ...
Devesh
-------------------------------------------------------
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel