Hi, I''m implementing a M-M relationship with a single table upon itself, and wonder if there''s anything I should look out for in rails, when doing this. Also, what notation I would best use in Rails (I''m guessing :through). I''m doing this because I have a Category model, and each category might be "similar to" a number of other categories. So, one way of modelling this is to have a new join table with two columns which are both Category ids. Thanks, Robb --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Robb wrote:> Hi, > > I''m implementing a M-M relationship with a single table upon itself, > and wonder if there''s anything I should look out for in rails, when > doing this. Also, what notation I would best use in Rails (I''m > guessing :through). > > I''m doing this because I have a Category model, and each category > might be "similar to" a number of other categories. So, one way of > modelling this is to have a new join table with two columns which are > both Category ids. > > Thanks, > Robb > > > >My guide may be able to help you out here: http://frozenplague.net/2008/04/29/self-referrential-relationships/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
That''s excellent. Thanks!> > My guide may be able to help you out here: > > http://frozenplague.net/2008/04/29/self-referrential-relationships/--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
KathysKode-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Jun-29 15:09 UTC
Re: many-to-many on a single table?
Ryan, I clicked your link and found a title page but no content? Kathleen On Jun 28, 6:19 pm, Ryan Bigg <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Robb wrote: > > Hi, > > > I''m implementing a M-M relationship with a single table upon itself, > > and wonder if there''s anything I should look out for in rails, when > > doing this. Also, what notation I would best use in Rails (I''m > > guessing :through). > > > I''m doing this because I have a Category model, and each category > > might be "similar to" a number of other categories. So, one way of > > modelling this is to have a new join table with two columns which are > > both Category ids. > > > Thanks, > > Robb > > My guide may be able to help you out here: > > http://frozenplague.net/2008/04/29/self-referrential-relationships/- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---