diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index c990c87eb..209b3e7c9 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -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')) );