search for: student2teacher

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

2005 Oct 05
0
has_and_belongs_to_many on legacy DB
...working with mapping ActiveRecord onto a legacy database. All is going well (using set_table_name, set_primary_key, etc), but I can''t get my many<=>many relationships to work. My contrived example of the situation: Student has_and_belongs_to_many Teachers. This is mapped via table student2teacher where the foreign keys are studentId and teacherId. The primary key in Student is studentId, and in Teacher is teacherId. However, when I run my unit tests I am getting this error: Mysql::Error: Unknown column ''j.student_id'' in ''where clause'' This is confusing,...