mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Fixing issue #2735, deleteAll() does not work correctly with model aliases
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5323 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
172f9817cb
commit
b870ea170c
1 changed files with 3 additions and 1 deletions
|
@ -1271,7 +1271,9 @@ class DboSource extends DataSource {
|
|||
$table = $this->fullTableName($model);
|
||||
$conditions = $this->conditions($query);
|
||||
|
||||
if ($this->execute("DELETE FROM {$table} {$conditions}") === false) {
|
||||
$alias = $this->alias . $this->name($model->name);
|
||||
|
||||
if ($this->execute("DELETE FROM {$table} {$alias} {$conditions}") === false) {
|
||||
$model->onError();
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue