I believe that when you have "extra" fields in a linking table you are
also required to have a primary key. I am not sure if Cake ca handle a
composite pk in this case. I.e. making your unique key into a primary.

/Martin


On Oct 28, 1:53 pm, Alexandru <[EMAIL PROTECTED]> wrote:
> i have a HABTM products->alloweduses
>
> this is the linking table.
>
> CREATE TABLE IF NOT EXISTS `alloweduses_products` (
>   `id` int(10) unsigned NOT NULL auto_increment,
>   `allowedus_id` int(10) unsigned NOT NULL,
>   `product_id` int(10) unsigned NOT NULL,
>   `value` enum('yes','no','na') collate latin1_general_ci NOT NULL
> default 'na',
>   PRIMARY KEY  (`id`),
>   UNIQUE KEY `uk` (`allowedus_id`,`product_id`)
> ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
> AUTO_INCREMENT=36 ;
>
> if i remove id the edit of product will fail. anyone know about this
> bug? there is already an opened ticket?
--~--~---------~--~----~------------~-------~--~----~
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