I'm having a bit of difficulty "getting" how to model a model's relationships to more of its own kind. So :
1. Person (child) has 1 , father 2. A Father who is a Person has many children 3. A person has many siblings 4. A person has one Godfather , and a Godfather only has one god child So if I were NOT to think ORM/ DataMapper , I would assume the following: *1:n , n:1* 1. a person would have a father reference i.e. father id , so to determine one's father one would query Person table where id = my father id 2. To know one's children one would query person table where father_id = my id 3. So for father/child , child/father, I see no need to create a secondary table i.e. should be able to rely just on Person table with the inclusion of the father_id column 4. No idea how to represent that in DM ____________________________________________________________________________________________________________ *n:n* 1. A person has 1 or more siblings 2. I would need A Siblings table where my id would be associated to another id i.e. my sibling, if I had 4 siblings there would be 4 records etc 3. This looks like the Friendship example on the DM doc page _________________________________________________________________________________________________________________ *1:1 * 1. A person only has one Godfather , and a person only has one god child 2. Here I could keep in the Person table reference to my godfather and reference to my godchild by maintaining a god_father_id, and god_child_id 3. So like the above case i.e. *1:n , n:1, *no need for an additional table, querying would be as straightforward 4. No idea how to represent this in DM So I believe I have some basic misunderstanding of how this is meant to work with DM so kindly help me clear my confusion. Much appreciated, -Charles -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To unsubscribe from this group and stop receiving emails from it, send an email to datamapper+unsubscr...@googlegroups.com. To post to this group, send email to datamapper@googlegroups.com. Visit this group at http://groups.google.com/group/datamapper. For more options, visit https://groups.google.com/groups/opt_out.