Index: openacs-4/packages/xotcl-core/tcl/cr-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/cr-procs.tcl,v diff -u -r1.54.2.3 -r1.54.2.4 --- openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 20 Oct 2015 08:23:39 -0000 1.54.2.3 +++ openacs-4/packages/xotcl-core/tcl/cr-procs.tcl 21 Oct 2015 07:55:10 -0000 1.54.2.4 @@ -620,7 +620,9 @@ lappend cond "coalesce(ci.live_revision,ci.latest_revision) = bt.revision_id" if {$parent_id ne ""} { if {$with_children} { - lappend cond "ci.parent_id in (select $parent_id from dual union select item_id from cr_items where parent_id = $parent_id)" + append from_clause ", (select $parent_id as item_id from dual union \ + select item_id from cr_items where parent_id = $parent_id) children" + lappend cond "ci.parent_id = children.item_id" } else { lappend cond "ci.parent_id = $parent_id" }