yiiext / nested-set-behavior

AR models behavior that allows to work with nested sets tree.
http://www.yiiframework.com/extension/nestedsetbehavior/
BSD 3-Clause "New" or "Revised" License
157 stars 64 forks source link

Difference between parent() and ancestors() is not obvious #40

Open fazliddin opened 8 years ago

fazliddin commented 8 years ago

ancestors() works as expected, and logically parent() should be as following:

public function parent()
{
     return $this->ancestors(1);
}

Bun instead, parents is written same as ancestors without depth.