From 76cf877d7ea77ae169257b289ec11b7032c770a1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 2 Aug 2011 08:56:21 -0500 Subject: [PATCH] Refactoring eloquent. --- system/db/eloquent/model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/db/eloquent/model.php b/system/db/eloquent/model.php index bde7cd18..15e5fd44 100644 --- a/system/db/eloquent/model.php +++ b/system/db/eloquent/model.php @@ -483,9 +483,9 @@ abstract class Model { return call_user_func_array(array($this, '_'.$method), $parameters); } - // All of the aggregate functions can be passed directly to the query instance. - // For these functions, we can simply return the response of the query. - if (in_array($method, array('count', 'sum', 'min', 'max', 'avg'))) + // All of the aggregate and persistance functions can be passed directly to the query + // instance. For these functions, we can simply return the response of the query. + if (in_array($method, array('insert', 'update', 'count', 'sum', 'min', 'max', 'avg'))) { return call_user_func_array(array($this->query, $method), $parameters); }