Thanks Lawrence Pit, you really helped me out with these two lines, I had been wondering for ages how to do it:
belongs_to :user, :child_key => [:user_id] belongs_to :friend, :class_name => "User", :child_key => [:friend_id] Also it's interesting idea to drop the auto-generated id's for the friendship model. I'm keeping mine because it just feels handy to have a "id" field in case I want to have a URL for my relationship object, or attach some objects to it later on. Admittedly without id the schema would be more beautiful :). The nice Datamapper website disapperared form the web, and after that it has been a bit of pain to look up basic stuff like this. I hope it comes back at some point. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" 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/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
