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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

