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 460 forks source link

Incorrect left and right value when adding new node. #178

Closed bczm8703 closed 9 years ago

bczm8703 commented 9 years ago

hi. i am using Laravel 5.1 and Baum ver 1.1.1.

when i tried to add a new node to be under a existing node in my tree, the parent_id is correct but the re calculated left and right value for the new node is incorrect. please see attached image

table schema: screen shot 2015-09-01 at 4 55 42 pm

data before adding new node screen shot 2015-09-01 at 4 58 13 pm

data after adding node screen shot 2015-09-01 at 4 58 36 pm

expected result screen shot 2015-09-01 at 5 02 48 pm

bczm8703 commented 9 years ago

sorry... my bad... it appears to be my error

bbuie commented 8 years ago

@bczm8703 What was the error? I seem to be getting it too.