| Hi,
 Lets say I have a table in my database that contains some person info.
 
 I have another table that represent friend connection between two persons.
 the table have two columns: first_person_id and second_person_id (friend connection, right? one person is friend of another).
 
 I want to create person object in my domain, that have field for friends.
 
 The problem is that the person_id can be in first_person_id or second_person_id
 so I dont know how to map this relation well.
 
 I thought about using view to flat the friends relationship, but it create new problems, when i want to add new items to the friends table.
 
 any ideas how can I map this relationship?
 
 
 |