search for: actionmodel

Displaying 1 result from an estimated 1 matches for "actionmodel".

Did you mean: sectionmodel
2006 Apr 09
1
Join using :THROUGH - SQL is wrong even when using :SOURCE
...use'': SELECT courses.* FROM courses INNER JOIN student_appointments ON courses.id = student_appointments.course_id WHERE (student_appointments.user_id = 1)" Clearly, user_id should be student_id, as the :foreign_key declaration in the StudentAppointment class states. But of course ActionModel has no way of knowing this. There is no room to declare which column should be used -- student_id or supervisor_id -- and ActionModel instead blindly goes for user_id, the index column name derived from the class name. Kaboom! The documentation states that :foreign_key declarations are ignored...