Hello

I have a sql table which only contains two field (user_id and
group_id), these fields also makes up a primary key, but whenever I
try to delete from the table (del(array('user_id' => $this->data...,
'group_id' => $this->data...)) I get the following error:

SELECT COUNT(*) AS `count` FROM `users_groups` AS `UsersGroups` WHERE
`UsersGroups`.`id` = 'users_groups.user_id'

I have tried to set the primaryKey in the model to the two correct
fields, but that didn't help.

What am I doing wrong? Thanks in advance

ps. I have also set belongsTo:
var $belongsTo = array(
        'Groups' => array(
                'className' => 'Groups',
                'foreignKey' => 'group_id'),
        'User' => array(
                'className' => 'User',
                'foreignKey' => 'user_id'));

--~--~---------~--~----~------------~-------~--~----~
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