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 => ["street_id=?", self.street_id] 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. Thoughts? Thanks! Norman --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---