RamonSmit / Nestable2

New pickup of Nestable!
Other
322 stars 147 forks source link

id returns parent by mistake. #91

Closed baskan closed 6 years ago

baskan commented 6 years ago

Expected behavior

[{"id":1,"parent_id":"","depth":0,"lft":1,"rgt":6},{"id":2,"parent_id":"1","depth":1,"lft":2,"rgt":3},{"id":3,"parent_id":"1","depth":1,"lft":4,"rgt":5}, ... ]

Actual behavior

[{"id":1,"parent_id":"","depth":0,"lft":1,"rgt":6},{"id":1,"parent_id":"1","depth":1,"lft":2,"rgt":3},{"id":1,"parent_id":"1","depth":1,"lft":4,"rgt":5}, ... ]

Steps to reproduce the behavior

hit list.nestable('asNestedSet') on latest version with numeric list. you'll see all id columns will output the parent's.

0781ff2ff3b86f8a734070b7343fa967fe801da4 breaks.

pjona commented 6 years ago

@baskan Thanks!