Hello,

I have a nested set structure, which I am loading from fixture (I'm
using Doctrine). The problem is, root level siblings get assigned the
same lft value which makes sorting the whole nested set to correctly
display it impossible.

My schema:

NestedSet:
  actAs: [NestedSet]
  tableName:          test_nested_set
  columns:
    id:
      type:           integer
      unsigned:       true
      primary:        true
      autoincrement:  true
    name:
      type:           string(150)
      notnull:        true

Fixture:

NestedSet:
  NestedSet:        true
  row1:
    name:           row 1
    children:
      row11:
        name:       row 1.1
      row12:
        name:       row 1.2
  row2:
    name:           row 2
    children:
      row21:
        name:       row 2.1
      row22:
        name:       row 2.2
  row3:
    name: row 3

Result in database after doctrine:data-load task:

id;name;lft;rgt;level
1;"row 1";1;10;0
2;"row 1.2";8;9;1
3;"row 1.1";6;7;1
4;"row 2";1;6;0
5;"row 2.2";4;5;1
6;"row 2.1";2;3;1
7;"row 3";1;2;0

Notice row1, row2 and row3 all having the same lft value.

Is this a bug or have I missed something?

Thanks,
Saulius

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to