Use a LEFT JOIN on associations that are nullable.

Have not tested THROUGH or has_and_belongs_to_many, beware!