title: CakePHP 3 Find threaded from id
body: <p>Unfortunately I have a problem using CakePHP 3, again.</p>
  
  <p>I have an entity called <em>Element</em> which implements the TreeBehavior and so contains a <em>parent_id</em>, a <em>lft</em> and a <em>rght</em> field.</p>
  
  <p>What I'm trying to do very unsuccessfully right now is getting a subtree from any element as parent and displaying it with the TreeHelper from dereuromark.</p>
  
  <p>If I use the usual way of retrieving threaded data <code>$this-&gt;Elements-&gt;find('threaded')</code> then <code>&lt;?= $this-&gt;Tree-&gt;generate($a, ['model' =&gt; 'Element']); ?&gt;</code> works perfectly and displays a beautiful tree of all my <em>Elements</em>.</p>
  
  <p>Now I tried to get the children from one <em>Element</em> with id <em>43</em> via 
  <code>$this-&gt;Elements-&gt;find('children', ['for' =&gt; 43])-&gt;find('threaded')</code>, as it is recommended in the <a href="http://book.cakephp.org/3.0/en/orm/behaviors/tree.html#a-quick-tour" rel="nofollow" title="Red Velvet Cookbook">Red Velvet Cookbook</a>, but a debug just gives me an empty array and the <code>Tree-&gt;generate</code> also doesn't work, obviously. Also, this would only give me an array of the children and not the <em>Element</em> with id <em>43</em> plus its nested children, correct? I think this is not what I need for the <code>Tree-&gt;generate</code>, though I don't understand why the code above is not working.</p>
  
  <p>I also tried to use <em>Hash</em> but couldn't be successful with the TreeHelper, too.</p>
  
  <p>Isn't there any simple method of getting the data I need and displaying it nicely? I would be glad for any helpful answers. Thank you!</p>