andruu wrote:
> SQL LOG
> UPDATE `categories` SET `parent_id` = NULL, `name` = 'Apparel',
> `description` = '', `modified` = '2008-12-12 14:27:13' WHERE
> `categories`.`id` = 7
>
>   
You probably have a NULL default to your DB.

I'm using the Tree behavior with no problem.

Here's my setup:

SQL:

CREATE TABLE IF NOT EXISTS `categories` (
  `id` int(11) NOT NULL auto_increment,
  `user_id` int(11) NOT NULL,
  `parent_id` int(11) NOT NULL default '0',
  `lft` int(11) NOT NULL,
  `rght` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `active` tinyint(1) NOT NULL,
  `created` datetime default NULL,
  `updated` datetime default NULL,
  PRIMARY KEY  (`id`)
);

The MVC  structure is generated with the bake script.
The only change I've made was to add the behaviour to the model, e.i. 
var $actsAs = array('Tree');

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to