Hi Brad,
could you please send a junit test or a code snip to reproduce this behavior? I will integrate your test to test-suite.
regards, Armin
Bradford Pielech wrote:
Hello again:
I have encountered an issue with the recursive graph structure that I asked about a couple of weeks ago. Below is a snippet from the repository.xml. Basically I have a DAGNode that has a list of parents and a list of children. I am able to get everything loaded in OJB correctly, however I have a problem when I retrieve the objects. Say, I have a DAGNode A and B where A is the parent and B is the child. I then store A and B in the DB. When I retrieve A, A's child list correctly has B, but B's parent list contains 1 object that is null. So if I call B.getParents().size(), it returns 1, but the only value in there is a null. Conversely, if I retrieve B, B's parent list is correct, but A's child list has 1 entry that is a null.
Any ideas what is going on?
thanks! Brad
repository_user.xml
----------------------------
<class-descriptor
class="SimpleDAGNode"
table="effect"
>
<field-descriptor
name="ID"
column="ebo_id"
jdbc-type="VARCHAR"
primarykey="true"
length="35"
>
</field-descriptor>
<collection-descriptor
name="children"
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
element-class-ref="SimpleDAGNode" indirection-table="parent_children_table" auto-retrieve="true" auto-update="none" auto-delete="none" > <fk-pointing-to-this-class column="parent_id"/> <fk-pointing-to-element-class column="child_id"/> </collection-descriptor>
<collection-descriptor
name="parents"
element-class-ref="SimpleDAGNode"
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
indirection-table="parent_children_table" auto-retrieve="true" auto-update="none" auto-delete="none" > <fk-pointing-to-this-class column="child_id"/> <fk-pointing-to-element-class column="parent_id"/> </collection-descriptor> </class-descriptor> --------------------
Relevant other settings:
PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl
ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
using rc7 downloaded from website
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
