:-)
$this->controller->FilesFolders->unbindModel(array(
'belongsTo' => array_keys($this->controller->FilesFolders->belongsTo)
))
On 12 нояб, 10:57, Kryptonian <[EMAIL PROTECTED]> wrote:
> Hi, I have this problem that if my model uses a var $belongsTo = array
> (), my updateAll() generated statement was affected with this error
> message:
>
> UPDATE `files_folders` AS `FilesFolders` LEFT JOIN `course_files` AS
> `CourseFile` ON (`FilesFolders`.`account_id` = `CourseFile`.`id`) SET
> `FilesFolders`.`deleted` = 0 WHERE `FilesFolders`.`instance_id` = '8′
>
> My code:
> <?php
> class FilesFolders extends AppModel
> {
> var $belongsTo = array(
> 'CourseFile' => array(
> 'className' => 'CourseFile',
> 'foreignKey' => 'account_id'
> )
> );
>
> }
>
> class BriefcaseComponent extends Object{
>
> function delete($id){
> $names = array('deleted' => '0');
> $conditions = "FilesFolders.instance_id = '$id'";
> $this->controller->FilesFolders->updateAll($names,
> $conditions);
> }
>
> }
>
> ?>
>
> How can i remove the "LEFT JOIN" statement in my Update statement?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---