Re: OJB Deadlock due to reference descriptor

Ilkka Priha <[email protected]> Wed, 20 Aug 2008 15:51:04 +0300
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
OJB fully supports mapping of several classes to the same table. In this 
case, you'll read the same data into two data structures being kind of 
"reflections" of each other.

-- Ilkka

SUMIT JAIN wrote:
> I am using OJB with java 1.5 
> 
> I have done the following mapping
> 
> <class-descriptor
> class="applications.dts.models.testcase.testcasegrid.TestCaseGrid"
> table="dts.testcaseactions">
>     	<field-descriptor name="testCaseActionId" column="TestCaseActionID"
> primarykey="true" autoincrement="true" access="readonly" />
>     	<field-descriptor name="testCaseId" column="TestCaseID" />
>     	<field-descriptor name="affectedInsert" column="InsertFlag" />
>     	
>     	<reference-descriptor 
> 		name="actionRef" 
> 	
> class-ref="applications.dts.models.testcase.testcasegrid.testcaseactions.TCAction"
> 		auto-retrieve="true"
> 		auto-update="true"
> 		auto-delete="true" >
> 		<foreignkey field-ref="testCaseActionId"/>
>     </reference-descriptor>
> </class-descriptor>
> 
> <class-descriptor
> class="applications.dts.models.testcase.testcasegrid.testcaseactions.TCAction"
> table="dts.actions">
>     	<field-descriptor name="testCaseActionId" column="TestCaseActionID"
> primarykey="true" autoincrement="true" access="readonly" />
>     	<field-descriptor name="testCaseId" column="TestCaseID"
> access="readonly"/>
>     	
>     	
>        <reference-descriptor 
> 		name="testCaseGrid" 
> 		class-ref="applications.dts.models.testcase.testcasegrid.TestCaseGrid"
> 		auto-retrieve="true"
> 		auto-update="true"
> 		auto-delete="true" >
> 		<foreignkey field-ref="testCaseActionId"/>
>     </reference-descriptor>
>     
> </class-descriptor>
> 
> 
> Logically it should be a deadlock but OJB does not throw any exception and
> is working fine.
> Can anybody elaborate on this why is it working fine Or is there a mistake
> in my mapping?
>