mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
Merge pull request #3021 from wvdongen/master
Fixed bug where select query in deleteAll could return wrong table name
This commit is contained in:
commit
514974900f
1 changed files with 2 additions and 1 deletions
|
@ -2703,8 +2703,9 @@ class Model extends Object implements CakeEventListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
$ids = $this->find('all', array_merge(array(
|
$ids = $this->find('all', array_merge(array(
|
||||||
'fields' => "DISTINCT {$this->alias}.{$this->primaryKey}",
|
'fields' => "{$this->alias}.{$this->primaryKey}",
|
||||||
'order' => false,
|
'order' => false,
|
||||||
|
'group' => "{$this->alias}.{$this->primaryKey}",
|
||||||
'recursive' => 0), compact('conditions'))
|
'recursive' => 0), compact('conditions'))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue