This one time, at band camp, Stephen Ince said:
SI>Castor proposed enhancement for self-referential JDO relationships.
SI>
SI>Add the parent-key attribute which would indicate the parent key for an object.
SI>
SI>Example.
SI> Class A --> Class B Class A has a one-to-many relationship with Class B.
SI> Class B has self-referential relationship
SI>
SI>
SI><class name="A" identity="aId" >
SI>:
SI> <field name="bs" type="B" collection="arraylist" >
SI> <sql many-key="a_id" parent-key="parent_b_id" />
SI> </field>
SI></class>
SI>
SI>
SI><class name="B" identity="aId" >
SI>:
SI> <field name="bs" type="B" collection="arraylist" >
SI> <sql many-key="parent_b_id" />
SI> </field>
SI></class>
SI>
SI>In the above example Class A uses the following query to load Class B objects:
SI>select parent from b where where aId = $1 and parent_b_id IS NULL
SI>A parent_b_id of NULL indicates a top level parent.
SI>
SI>Also relax the rule for dependent objects. The check isn't performed for
self-referential relationships.
SI>
SI>I will gladly added the enhancement if it makes sense.
Steve,
If you do add this, please follow the Guidelines for Code Contribution:
http://www.castor.org/cvs.html#Guidelines-For-Code-Contribution
Then file a Bugzilla (http://bugzilla.exolab.org/) report with a
priority of Enhancement. Then explain the patch and attach the diffs
to the report.
Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
The Castor Project
http://www.castor.org/
Apache Geronimo
http://incubator.apache.org/projects/geronimo.html
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev