Commit 437da2a2 by Alexander Makarov

Added note about the fact that both findOne() and one() aren't adding LIMIT 1 to the query

parent e3afb88a
...@@ -195,6 +195,9 @@ $customer = Customer::findAll([ ...@@ -195,6 +195,9 @@ $customer = Customer::findAll([
]); ]);
``` ```
> Note: Neither `findOne()` nor `one()` adds `LIMIT 1` to the query so if you need "any active customer"
you should add limit manually i.e. `Customer::find()->where(['status' => Customer::STATUS_ACTIVE])->limit(1)->one();`.
### Retrieving Data in Arrays ### Retrieving Data in Arrays
......
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