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.
NestedSetsBehavior will set the
lft
,rgt
, anddepth
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:
I would expect that to output the new
lft
attribute value, but it will output the old one.