File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -796,6 +796,18 @@ public function findList(Query $query, array $options = []) {
796
796
* Values belonging to a parent row based on their parent_id value will be
797
797
* recursively nested inside the parent row values using the `children` property
798
798
*
799
+ * You can customize what fields are used for nesting results, by default the
800
+ * primary key and the `parent_id` fields are used. If you you wish to change
801
+ * these defaults you need to provide the keys `idField` or `parentField` in
802
+ * `$options`:
803
+ *
804
+ * {{{
805
+ * $table->find('threaded', [
806
+ * 'idField' => 'id',
807
+ * 'parentField' => 'ancestor_id'
808
+ * ]);
809
+ * }}}
810
+ *
799
811
* @param \Cake\ORM\Query $query
800
812
* @param array $options
801
813
* @return \Cake\ORM\Query
You can’t perform that action at this time.
0 commit comments