public function treeStart()
{
$owner = $this->getOwner();
$db = $owner->getDbConnection();
$query = 'SELECT MAX(' . $this->rightAttribute . ') AS maxright FROM ' . $owner->treeTable();
$val = $db->createCommand($query)->queryRow();
if ($val['maxright']) {
return $val['maxright'] + 1;
} else {
return 1;
}
}