Hi,

Can anyone else reproduce this problem? I'm thinking of reporting it
as a bug.

Assuming that these three models exist in a plugin called "Gems". I
get an error of "Database table servey_questions for model
ServeyQuestion was not found." when trying to find a SurveyContact
record. But it should be looking for servey_questions it should be
looking for gems_servey_questions.

Looks to me that Cake is ignore the plugin path for the belongsTo
reference, but it sees the plugin path for the hasMany. So I'm
thinking its a nesting problem.

class SurveyContact extends GemsAppModel
{
        var $name='SurveyContact';
        var $useTable="gems_survey_contacts";
        var $order='SurveyContact.created ASC';

        var $hasMany=array('Gems.SurveyAnswer');
}

class SurveyAnswer extends GemsAppModel
{
        var $name='SurveyAnswer';
        var $useTable="gems_survey_answers";
        var $order='SurveyAnswer.created ASC';

        var $belongsTo=array('Gems.ServeyQuestion');
}

class SurveyQuestion extends GemsAppModel
{
        var $name='SurveyQuestion';
        var $useTable="gems_survey_questions";
        var $order='SurveyQuestion.order ASC';
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to