Re: TreeBehavior fails to set lft and rght correctly

2009-12-03 Thread Martin Kirchgessner
On 3 déc, 10:27, AD7six wrote: > How many fails to the tree test case give you. Well, i've found out what happens. The tree test is OK - my problem came from an overloaded updateAll in my AppModel. Sorry for spam. Check out the new CakePHP Questions site http://cakeqs.org and help others with

Re: TreeBehavior fails to set lft and rght correctly

2009-12-03 Thread AD7six
On 3 dic, 01:19, Martin Kirchgessner wrote: > Top of the model is : > > class MenuItem extends AppModel > { >         var $name = 'MenuItem'; > >         var $actsAs = array('Tree', 'Containable'); > > the table : > > CREATE TABLE `menu_items` ( >   `id` int(11) NOT NULL auto_increment, >   `par

Re: TreeBehavior fails to set lft and rght correctly

2009-12-02 Thread Dave
That was what the comment suggested and I was suggesting you try their suggestion =) I wish I could help more, as I said, I didn't need to specify anything different then what you are using, but I am also using the latest svn checkout. I thought perhaps the comment was regarding an older version

Re: TreeBehavior fails to set lft and rght correctly

2009-12-02 Thread Martin Kirchgessner
Top of the model is : class MenuItem extends AppModel { var $name = 'MenuItem'; var $actsAs = array('Tree', 'Containable'); the table : CREATE TABLE `menu_items` ( `id` int(11) NOT NULL auto_increment, `parent_id` int(11) default NULL, `lft` int(11) default NULL, `rght

Re: TreeBehavior fails to set lft and rght correctly

2009-12-02 Thread Dave
Also, these two suggestions were in the comments. I didn't need the relationship from the first one but I am using the latest svn checkout, so perhaps he was posting that from an older version. Also the second one might be useful as well. The model needs a relation for me to work with this exam

Re: TreeBehavior fails to set lft and rght correctly

2009-12-02 Thread Dave
Can you paste your model? Or at least the important parts at the top? On Wed, Dec 2, 2009 at 6:19 PM, Martin Kirchgessner wrote: > Hi everyone, > > I'm using TreeBehavior in a classic model, but its lft and rght fields > are not set correctly. > > > I tried these two save() in a controller : >