Hi,
I am using OJB 1.0.0.. I have a stack overflow when loading tree
dependencies:
create table A (
id integer primary key,
parent_id integer foreign key A (id)
);
Then there is a class
class A
{
int a;
int parent_id;
A parent;
Collection childCol;
};
and a ojb mapping:
<class-descriptor class="A" table="A">
<field-descriptor id="1"
name="id"
column="id"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="false"
/>
<field-descriptor id="2"
name="parent_id"
column="parent_id"
jdbc-type="INTEGER"
/>
<collection-descriptor name="childCol" element-class-ref="A"
auto-retrieve="true" auto-update="true" auto-delete="false" proxy="false"
refresh="true">
<inverse-foreignkey field-id-ref="2"/>
</collection-descriptor>
<reference-descriptor name="parent" class-ref="A" proxy="false"
refresh="true" auto-retrieve="true" auto-update="true"
auto-delete="false">
<foreignkey field-id-ref="2"/>
</reference-descriptor>
</class-descriptor>
When now loading the root node OJB runs into a stack overflow. For me it
looks like OJB does not find out that the root node was already loaded
when
filling the reference from the first child to the root object. If I remove
one of the references everything works fine.
Is this a general problem. Of course I could build a work around by
loading the collections by ojb and then iterating through the tree and
fill
the references to the parent objects by hand. On the other hand it maybe a
problem when filling other references too but not producing a stack
overflow
there because of there are no circular dependencies but the objects maybe
loaded twice too.
best regards,
Guido
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]