From 35b5bd8ef41040929661d381928fa3d9deb44c4a Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Fri, 10 Jan 2014 15:56:42 +0100 Subject: [PATCH] removed get() shortcut from find() --- extensions/yii/elasticsearch/ActiveRecord.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/extensions/yii/elasticsearch/ActiveRecord.php b/extensions/yii/elasticsearch/ActiveRecord.php index 67410a6..f91df2c 100644 --- a/extensions/yii/elasticsearch/ActiveRecord.php +++ b/extensions/yii/elasticsearch/ActiveRecord.php @@ -66,14 +66,6 @@ class ActiveRecord extends BaseActiveRecord { $query = static::createQuery(); if (is_array($q)) { - if (count($q) == 1 && (array_key_exists(ActiveRecord::PRIMARY_KEY_NAME, $q)) && $query->where === null) { - $pk = $q[ActiveRecord::PRIMARY_KEY_NAME]; - if (is_array($pk)) { - return static::mget($pk); - } else { - return static::get($pk); - } - } return $query->andWhere($q)->one(); } elseif ($q !== null) { return static::get($q);