I noticed that ojb gets into an infinite loop when there are circular dependencies between objects and refresh(=true) is specified on the reference descriptors.
My testcase has a class A which points to B and vice versa and there is an instance of A (A1) which points to an instance of B (B1) and B1 points back to A1.
When A1 is read and a getB is done the system gets in an infinite loop.
Looking at the stacktrace I see that the following is happening:
When A1 reads B1 then the relations of B1 are refreshed which again gets A1 from the cache which reads B1 and B1 refreshes its references which gets A1 from the cache which again refreshes it references etc.
See also the repository.xml below. Is this really an issue or is my setup wrong?
I am looking at the latest 1.1 cvs version and using the PB api.
Here is my repository.xml:
<!-- class: org.elver.store.test.testcasesimple.B in table: B --> <class-descriptor class="org.elver.store.test.testcasesimple.B" table="B">
<field-descriptor name="name" column="name" jdbc-type="VARCHAR" nullable="true"/>
<field-descriptor name="A_ID" column="A_ID" jdbc-type="INTEGER" nullable="true" access="anonymous"/>
<reference-descriptor name="myA" class-ref="org.elver.store.test.testcasesimple.A" refresh="true" auto-update="object" auto-retrieve="true">
<foreignkey field-ref="A_ID" />
</reference-descriptor>
<field-descriptor name="ID" column="ID" jdbc-type="INTEGER" primarykey="true" autoincrement="true" access="anonymous"/>
</class-descriptor>
<!-- class: org.elver.store.test.testcasesimple.A in table: A --> <class-descriptor class="org.elver.store.test.testcasesimple.A" table="A">
<field-descriptor name="name" column="name" jdbc-type="VARCHAR" nullable="true"/>
<field-descriptor name="B_ID" column="B_ID" jdbc-type="INTEGER" nullable="true" access="anonymous"/>
<reference-descriptor name="myB" class-ref="org.elver.store.test.testcasesimple.B" refresh="true" auto-update="object" auto-retrieve="true">
<foreignkey field-ref="B_ID" />
</reference-descriptor>
<field-descriptor name="ID" column="ID" jdbc-type="INTEGER" primarykey="true" autoincrement="true" access="anonymous"/>
</class-descriptor>
--
With Regards, Martin Taal
Springsite Barchman Wuytierslaan 72b 3818 LK Amersfoort tel: +31 (0)33 462 02 07 fax: +31 (0)33 463 77 12 Mobile: +31 (0)6 288 48 943 email: [EMAIL PROTECTED] web: www.springsite.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]