Files
pmgr/models/contact_phone.php
abijah f48e7d8907 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/site@51 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-06-01 04:29:26 +00:00

31 lines
667 B
PHP

<?php
class ContactPhone extends AppModel {
var $name = 'ContactPhone';
var $validate = array(
'id' => array('numeric'),
//'type' => array('inlist'),
'phone' => array('phone'),
'ext' => array('numeric')
);
var $hasAndBelongsToMany = array(
'Contact' => array(
'className' => 'Contact',
'joinTable' => 'contacts_methods',
'foreignKey' => 'method_id',
'associationForeignKey' => 'contact_id',
'unique' => true,
'conditions' => "method = 'PHONE'",
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
)
);
}
?>