Closed ptheofan closed 9 years ago
Ok, it appears the hasManyRoots
has been substituted with the treeAttribute
. To transparently upgrade from the older version use it like this
/**
* @return array
*/
public function behaviors() {
return [
[
'class' => NestedSetsBehavior::className(),
'treeAttribute' => 'root',
'depthAttribute' => 'level',
],
];
}
It has not gone away, but it is not working properly from my tests, the lft rgt attributes are wrong. I am looking now to fix it.
hm, ok, let me know if I can help in any way.
This is already fixed.
@ptheofan Btw you can't transparently upgrade from old versions because Yii 1 version is not old version, it just different version. And this behavior is not released. You can look at milestones when release come. For example instead of level another depth attribute is introduced. It starts from 0 instead of 1. Also there will be changes to root's attributes. So i can't recommend upgrade schemas for now. Probably converter will be needed. For example $depthAttribute
will be optional, because not all NS tasks need it.
Did the multiroot functionality go away with the latest update? The hasManyRoots attribute is no longer supported.