Commit a0240daa by Qiang Xue

Merge pull request #3658 from creocoder/activequery-one-refactoring

ActiveQuery::one() slight refactoring
parents 0c02edbf ce1e4697
......@@ -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;
......
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