Browse Source

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

tags/2.0.1
Alexander Makarov 10 years ago
parent
commit
437da2a226
  1. 3
      docs/guide/db-active-record.md

3
docs/guide/db-active-record.md

@ -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

Loading…
Cancel
Save