Commit 35b5bd8e by Carsten Brandt

removed get() shortcut from find()

parent 3a86270d
...@@ -66,14 +66,6 @@ class ActiveRecord extends BaseActiveRecord ...@@ -66,14 +66,6 @@ class ActiveRecord extends BaseActiveRecord
{ {
$query = static::createQuery(); $query = static::createQuery();
if (is_array($q)) { 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(); return $query->andWhere($q)->one();
} elseif ($q !== null) { } elseif ($q !== null) {
return static::get($q); return static::get($q);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment