Hey, I have a hasMany relationship which when I bake the model, php picks up. I also have a corresponding belongsTo in teh other model. For some reason when I try to get this data, mysql throws an error saying that that table can't be found.
To simplify, that hasMany relationship (in this case, School hasMany SchoolMajor) is not being added to the sql query which is built by cake. There can't be an error in the relationships because they were built using bake. I have double and triple checked them. if i wasn't sure of this I would post them. however, I will post the sql error along with the Joins and the Where clause which I have built: Thanks in advance to anyone. FROM `schools` AS `School` LEFT JOIN `campus_types` AS `CampusType` ON (`School`.`locale` = `CampusType`.`id`) LEFT JOIN `states` AS `State` ON (`School`.`stabbr` = `State`.`id`) LEFT JOIN `is_types` AS `IsType` ON (`School`.`sector` = `IsType`.`id`) LEFT JOIN `school_admissions` AS `SchoolAdmission` ON (`SchoolAdmission`.`school_id` = `School`.`id`) LEFT JOIN `school_aids` AS `SchoolAid` ON (`SchoolAid`.`school_id` = `School`.`id`) LEFT JOIN `school_arrests` AS `SchoolArrest` ON (`SchoolArrest`.`school_id` = `School`.`id`) LEFT JOIN `school_crimes` AS `SchoolCrime` ON (`SchoolCrime`.`school_id` = `School`.`id`) LEFT JOIN `school_missions` AS `SchoolMission` ON (`SchoolMission`.`school_id` = `School`.`id`) LEFT JOIN `school_tuitions` AS `SchoolTuition` ON (`SchoolTuition`.`school_id` = `School`.`id`) LEFT JOIN `vocational_tuitions` AS `VocationalTuition` ON (`VocationalTuition`.`school_id` = `School`.`id`) WHERE `SchoolMajor`.`awlevel` = 6 AND `School`.`id` =164465 ORDER BY `SchoolMajor`.`crace24` DESC LIMIT 1 Warning: SQL Error: 1054: Unknown column 'SchoolMajor.awlevel' in 'where clause' in C:\_projects\eclipse\NEW-MF\site\cake\libs\model \datasources\dbo_source.php on line 440 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---