Hi all,
This is my model groupstore
class GroupStore extends AppModel {
var $name = 'GroupStore';
var $primaryKey = 'group_store_id';
var $belongsTo = array(
'Group' => array(
'className' => 'Group',
'foreignKey' => 'group_id',));
}
group_stroes tbl schema is
( group_store_id group_id store_id active deleted )
group_store_id is primary key
In my conroller i have this code snippet
$this->GroupStore->deleteAll(array('GroupStore.group_id' => $this-
>data['GroupStore']['group_id']));
But on execution of this code snippet I am getting this error
Warning (512): SQL Error: 1054: Unknown column 'GroupStore.id' in
'field list' [CORE/cake/libs/model/datasources/dbo_source.php, line
525]
Query: SELECT `GroupStore`.`id` FROM `group_stores` AS `GroupStore`
WHERE `GroupStore`.`group_id` = 432
Help me
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 [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