cakephp find threaded parent_id - different name

cakephp

Solution

On 2.1 you can pass the option `parent`, you may need the tree behavior attached for it to work.

Before 2.1 you can just use virtual fields in your model:

public $virtualFields = array(
    'parent_id' => 'Model.father'
);

Problem

I want to use CakePHP's `Model::find('threaded')` method but in my MySQL table the parent key field is `father` and not `parent_id` - is it possible to use it with this field name instead?

Original source