From c2c47a99ae1f3bea55cf07be1e51a1ae1174f76f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?= Date: Fri, 10 Jan 2014 01:13:24 +0300 Subject: [PATCH] Type fix --- docs/guide/active-record.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/active-record.md b/docs/guide/active-record.md index 44b8ecb..710efdc 100644 --- a/docs/guide/active-record.md +++ b/docs/guide/active-record.md @@ -376,8 +376,8 @@ $customer = Customer::find(1); // lazy loading: SELECT * FROM tbl_order WHERE customer_id=1 AND subtotal>100 $orders = $customer->getOrders()->where('subtotal>100')->all(); -// eager loading: SELECT * FROM tbl_customer LIMIT 10 - SELECT * FROM tbl_order WHERE customer_id IN (1,2,...) AND subtotal>100 +// eager loading: SELECT * FROM tbl_customer LIMIT 100 +// SELECT * FROM tbl_order WHERE customer_id IN (1,2,...) AND subtotal>100 $customers = Customer::find()->limit(100)->with([ 'orders' => function($query) { $query->andWhere('subtotal>100');