search for: unassigned_applicants

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

2005 Aug 04
0
Finding rows in table a with zero related rows in table b, part ii
OK. After a little more digging in MySQL''s manual on SubSelects, I''ve changed the finder_sql entry in my model declaration: class District < ActiveRecord::Base has_many :interviewers, :order => "lname, fname" has_many :applicants has_many :unassigned_applicants, :class_name => "Applicant", :finder_sql => "select a.* from applicants a left join applicants_interviewers ai " + "on a.id = ai.applicant_id where ai.applicant_id is null" end Running that SQL through the mysql command-line tool returns exactly th...