Hi guys,
this is driving me nuts: when i use bindModel() to add a relationship
on the fly to an certain model, it seems that cake ignores the table
name specified in the attached model in var $useTable.
Example:
class ActivitiesHostess extends AppModel {
var $name = 'ActivitiesHostess';
var $useTable = 'v_activities_hostess';
var $belongsTo = array('Activity', 'Hostess');
}
this is my added relationship class, providing one girl per activity
(don't mess, thats a harmless website smile.gif. so i attach this on
the fly in the hostess controller:
$url['activity']?$this->Hostess->bindModel(array('hasOne'=>array
('ActivitiesHostess' => array())), false):'';
but then, after clearing the cache and reload the website cake says:
>>> Error: Database table activities_hostesses for model ActivitiesHostess was
>>> not found.
but in the model i specified the table name as v_activities_hostess
(it's a view). has anyone any explanation for this or a workaround to
avoid cake aborting here? googled half the world, but didn't have any
success...
any hints are very appreciated
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---