From 3f6c526718b8bb024dfe7e69079e20ec80fc78b1 Mon Sep 17 00:00:00 2001 From: abijah Date: Mon, 1 Jun 2009 04:29:26 +0000 Subject: [PATCH] Removed the named table alias from each of the HABTM joins, since we don't know in advance what name will be used in the actual join git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@51 97e9348a-65ac-dc4b-aefc-98561f571b83 --- site/models/contact.php | 6 +++--- site/models/contact_address.php | 2 +- site/models/contact_email.php | 2 +- site/models/contact_phone.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/site/models/contact.php b/site/models/contact.php index 5aab7f3..c3d834a 100644 --- a/site/models/contact.php +++ b/site/models/contact.php @@ -31,7 +31,7 @@ class Contact extends AppModel { 'foreignKey' => 'contact_id', 'associationForeignKey' => 'method_id', 'unique' => true, - 'conditions' => "ContactsMethod.method = 'POST'", + 'conditions' => "method = 'POST'", 'fields' => '', 'order' => '', 'limit' => '', @@ -46,7 +46,7 @@ class Contact extends AppModel { 'foreignKey' => 'contact_id', 'associationForeignKey' => 'method_id', 'unique' => true, - 'conditions' => "ContactsMethod.method = 'PHONE'", + 'conditions' => "method = 'PHONE'", 'fields' => '', 'order' => '', 'limit' => '', @@ -61,7 +61,7 @@ class Contact extends AppModel { 'foreignKey' => 'contact_id', 'associationForeignKey' => 'method_id', 'unique' => true, - 'conditions' => "ContactsMethod.method = 'EMAIL'", + 'conditions' => "method = 'EMAIL'", 'fields' => '', 'order' => '', 'limit' => '', diff --git a/site/models/contact_address.php b/site/models/contact_address.php index d808b41..5503268 100644 --- a/site/models/contact_address.php +++ b/site/models/contact_address.php @@ -14,7 +14,7 @@ class ContactAddress extends AppModel { 'foreignKey' => 'method_id', 'associationForeignKey' => 'contact_id', 'unique' => true, - 'conditions' => "ContactsMethod.method = 'POST'", + 'conditions' => "method = 'POST'", 'fields' => '', 'order' => '', 'limit' => '', diff --git a/site/models/contact_email.php b/site/models/contact_email.php index c9b59dd..474e2b2 100644 --- a/site/models/contact_email.php +++ b/site/models/contact_email.php @@ -14,7 +14,7 @@ class ContactEmail extends AppModel { 'foreignKey' => 'method_id', 'associationForeignKey' => 'contact_id', 'unique' => true, - 'conditions' => "ContactsMethod.method = 'EMAIL'", + 'conditions' => "method = 'EMAIL'", 'fields' => '', 'order' => '', 'limit' => '', diff --git a/site/models/contact_phone.php b/site/models/contact_phone.php index 79b9807..8569c89 100644 --- a/site/models/contact_phone.php +++ b/site/models/contact_phone.php @@ -16,7 +16,7 @@ class ContactPhone extends AppModel { 'foreignKey' => 'method_id', 'associationForeignKey' => 'contact_id', 'unique' => true, - 'conditions' => "ContactsMethod.method = 'PHONE'", + 'conditions' => "method = 'PHONE'", 'fields' => '', 'order' => '', 'limit' => '',