Skip to content

Commit

Permalink
Improving docs for find('threaded')
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jan 19, 2014
1 parent f685f49 commit 8e893e4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ORM/Table.php
Expand Up @@ -796,6 +796,18 @@ public function findList(Query $query, array $options = []) {
* Values belonging to a parent row based on their parent_id value will be
* recursively nested inside the parent row values using the `children` property
*
* You can customize what fields are used for nesting results, by default the
* primary key and the `parent_id` fields are used. If you you wish to change
* these defaults you need to provide the keys `idField` or `parentField` in
* `$options`:
*
* {{{
* $table->find('threaded', [
* 'idField' => 'id',
* 'parentField' => 'ancestor_id'
* ]);
* }}}
*
* @param \Cake\ORM\Query $query
* @param array $options
* @return \Cake\ORM\Query
Expand Down

0 comments on commit 8e893e4

Please sign in to comment.