creocoder / yii2-nested-sets

The nested sets behavior for the Yii framework.
Other
446 stars 129 forks source link

Left/right/depth attributes not updated on the record after update #114

Open brandonkelly opened 6 years ago

brandonkelly commented 6 years ago

NestedSetsBehavior will set the lft, rgt, and depth attributes on the record when it’s a new record, but it won’t update those attributes after performing an operation on an existing record.

Example:

$a->prependTo($b);
echo $a->lft;

I would expect that to output the new lft attribute value, but it will output the old one.