Merge pull request #3021 from wvdongen/master

Fixed bug where select query in deleteAll could return wrong table name
This commit is contained in:
Mark Story 2014-03-21 08:21:24 -04:00
commit 514974900f

View file

@ -2703,8 +2703,9 @@ class Model extends Object implements CakeEventListener {
}
$ids = $this->find('all', array_merge(array(
'fields' => "DISTINCT {$this->alias}.{$this->primaryKey}",
'fields' => "{$this->alias}.{$this->primaryKey}",
'order' => false,
'group' => "{$this->alias}.{$this->primaryKey}",
'recursive' => 0), compact('conditions'))
);