in your service model set relation like this
$belongsTo = array(
'ServiceProvider' => array(
'className' => 'User',
'foreignKey' => 'served_by'
),
'ServiceUser' => array(
'className' => 'User',
'foreignKey' => 'served_to',
)
);
Then yopu can access
Hi CakePHP programmers,
plz help me..
We have two tables - users and services.
services table needs to have two fields (served_by & served_to) -
both referring to user_id. That case, what should be field names in
services table because as per cakephp file naming conventions "foreign
keys should