From 07ca6780d529112962f6caac496481b21bf61189 Mon Sep 17 00:00:00 2001 From: Oleg Poludnenko Date: Tue, 8 Oct 2024 11:55:38 +0300 Subject: [PATCH] ActiveQuery::one() limiting database records #58 --- framework/db/Query.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/db/Query.php b/framework/db/Query.php index 1819c9c3107..a614ab58148 100644 --- a/framework/db/Query.php +++ b/framework/db/Query.php @@ -280,6 +280,8 @@ public function populate($rows) */ public function one($db = null) { + $this->limit(1); + if ($this->emulateExecution) { return false; }