mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 05:45:33 +08:00
Merge pull request #3658 from creocoder/activequery-one-refactoring
ActiveQuery::one() slight refactoring
This commit is contained in:
@@ -223,8 +223,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
|
||||
*/
|
||||
public function one($db = null)
|
||||
{
|
||||
$command = $this->createCommand($db);
|
||||
$row = $command->queryOne();
|
||||
$row = parent::one($db);
|
||||
if ($row !== false) {
|
||||
if ($this->asArray) {
|
||||
$model = $row;
|
||||
|
||||
Reference in New Issue
Block a user