etrepat / baum

Baum is an implementation of the Nested Set pattern for Laravel's Eloquent ORM.
http://etrepat.com/baum
MIT License
2.24k stars 459 forks source link

makeChildOf() not works #166

Closed yinsenf closed 9 years ago

yinsenf commented 9 years ago

makeChildOf() not works in my project since upgraded baum version.

$child->save(); $child->makeChildOf($parent);

in Builder.php line 457
at Builder->where('lft', '>=', null)
at call_user_func_array(array(object(Builder), 'where'), array('lft', '>=', null)) in Builder.php line 526
at Builder->where('lft', '>=', null) in Move.php line 386
at Move->applyLockBetween(null, '6') in Move.php line 130
at Move->updateStructure() in Move.php line 105
at Move->Baum\{closure}(object(MySqlConnection)) in Connection.php line 451
at Connection->transaction(object(Closure)) in Move.php line 106
at Move->perform() in Move.php line 87
yinsenf commented 9 years ago

I think issue is on created a new item, but lft and rgt column is null. So after that every operating will be failed.

yinsenf commented 9 years ago

This is my wrong, sorry