I have a big trouble to deal with this 1:n relationship with ojb. After
adding the repository files for the 1:n relationship and launching the
application server, I cannot even get the persistent Broker back. (It
returns null.) Without those files, everything works fine. It looks like
I did something wrong inside these two description files. If you can see
something, pls let me know. Really appreciate it. Btw, I am using
db-ojb-1.0.rc5
Here are they:
<class-descriptor
class="com.abc.PatientAssessmentsVO"
table="SCI_DEV.PATIENT_ASSESSMENTS"
>
<field-descriptor id="0"
name="id"
column="ID"
jdbc-type="BIGINT"
autoincrement="true"
sequence-name="patient_assessment_id"
/>
<field-descriptor id="1"
name="total_score"
column="TOTAL_SCORE"
jdbc-type="BIGINT"
/>
<field-descriptor id="2"
name="create_date"
column="CREATE_DATE"
jdbc-type="TIMESTAMP"
conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2SqlTimest
ampFieldConversion"
/>
<field-descriptor id="3"
name="created_by"
column="CREATED_BY"
jdbc-type="VARCHAR"
/>
<collection-descriptor
name="allArticlesInGroup"
element-class-ref="com.abc.DusoiAssessment"
collection-class="com.abc.AssessmentCollection"
auto-retrieve="true"
auto-update="true"
auto-delete="true"
>
<inverse-foreignkey field-id-ref="2"/>
</collection-descriptor>
</class-descriptor>
<class-descriptor
class="com.abc.DusoiAssessmentVO"
table="SCI_DEV.DUSOI_ASSESSMENT"
>
<field-descriptor id="0"
name="date_recorded"
column="DATE_RECORDED"
jdbc-type="TIMESTAMP"
primarykey="true"
conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2SqlTimest
ampFieldConversion"
/>
<field-descriptor id="1"
name="instrument_version"
column="INSTRUMENT_VERSION"
jdbc-type="BIGINT"
/>
<field-descriptor id="2"
name="patient_assessments_id"
column="PATIENT_ASSESSMENTS_ID"
jdbc-type="BIGINT"
/>
<field-descriptor id="3"
name="diagnosis_score"
column="DIAGNOSIS_SCORE"
jdbc-type="BIGINT"
/>
<reference-descriptor name="dusoi_assessments"
class-ref="com.abc.PatientAssessmentsVO">
<foreignkey field-id-ref="2"/>
</reference-descriptor>
</class-descriptor>
Paul He
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]