many-to-many on a single table?

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

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:

That's excellent. Thanks!

Ryan, I clicked your link and found a title page but no content? Kathleen