Re: Tree Behaviour reorder (parent_id NULL)
Saved my day :) thanks On 25 Sty, 05:51, Brenton B brenton.bar...@gmail.com wrote: Just a note to hopefully help others avoid some confusion ... When using theTreeBehaviour, the table should be setup such that it allows NULL, with it being the default. I know thehttp://book.cakephp.org/view/228/Basic-Usagepage shows the SQL as such; however, I have this crazy habit of not allowing null if it doesn't have to be. The docs don't clearly state it must be null, so figured it would be ok. However, after getting frustrated with the `reorder()` function, I finally discovered that parent_id can't be '0', but 'null' if it's at the top. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Tree Behaviour reorder (parent_id NULL)
Did you add your note to the book. On Jan 25, 5:51 am, Brenton B brenton.bar...@gmail.com wrote: Just a note to hopefully help others avoid some confusion ... When using the Tree Behaviour, the table should be setup such that it allows NULL, with it being the default. I know thehttp://book.cakephp.org/view/228/Basic-Usagepage shows the SQL as such; however, I have this crazy habit of not allowing null if it doesn't have to be. The docs don't clearly state it must be null, so figured it would be ok. However, after getting frustrated with the `reorder()` function, I finally discovered that parent_id can't be '0', but 'null' if it's at the top. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en