From 3af0600917c38d347f1809bcbba1566500901f8d Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Sat, 4 May 2013 22:41:27 -0400 Subject: [PATCH] Limited the number of fields returned when searching for associated events and zones --- web/app/Model/Monitor.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app/Model/Monitor.php b/web/app/Model/Monitor.php index 5e88daf3b..bdc32dd3a 100644 --- a/web/app/Model/Monitor.php +++ b/web/app/Model/Monitor.php @@ -4,11 +4,13 @@ public $hasMany = array( 'Event' => array( 'className' => 'Event', - 'foreignKey' => 'MonitorId' + 'foreignKey' => 'MonitorId', + 'fields' => 'Event.Id' ), 'Zone' => array( 'className' => 'Zone', - 'foreignKey' => 'MonitorId' + 'foreignKey' => 'MonitorId', + 'fields' => 'Zone.Id' ) );