You'd want to get rid of the $belongsTo relationship. This is just a
HABTM relationship (the composite primary key here shouldn't be a
problem, although I don't believe Cake will enforce it.).
On Mon, Jul 7, 2008 at 6:38 AM, zpon <[EMAIL PROTECTED]> wrote:
> 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:
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---