Fixes #9 but beware! Can cause side-effects: we are returning Query instead of calling `->one()` or `->all()`

This commit is contained in:
bethrezen 2015-02-07 11:49:47 +03:00
parent a31ab24a58
commit ad43cf5576

View File

@ -254,7 +254,7 @@ abstract class ActiveRecord extends BaseActiveRecord
return \Yii::$app->get('arangodb');
}
protected static function findByCondition($condition, $one)
protected static function findByCondition($condition)
{
/** @var ActiveQuery $query */
$query = static::find();
@ -270,7 +270,7 @@ abstract class ActiveRecord extends BaseActiveRecord
}
}
return $one ? $query->andWhere($condition)->one() : $query->andWhere($condition)->all();
return $query->andWhere($condition);
}
/**