Is it possible to have a has_many relationship without a foreign key?
I’d like to eager-load associations based on some arbitrary SQL. For
instance, I would like to do something like:
:has_many :neighbors, :class_name => “Person”, :conditions =>
I believe this would work, but it would still look for a foreign key.
I know I could do this with named_scopes, or defining some method. But
I’d like to eager-load all the neighbors at once.