On Oct 28, 7:28 am, Scott LaBounty <[email protected]> wrote: > Jeremy, > > Thanks for the input. A couple of questions though: > > I'm not sure what to rename when you say the associations. Do you mean in > the table or in the model or both? Also, I'm not sure what a "nested set" is > in the database world. I'll have to look that up.
I'd rename the foreign key to parent_comment_id. The associations would be: many_to_one :parent_comment, :class=>self one_to_many :child_comments, :key=>:parent_comment_id, :class=>self Nested sets allow you to store hierarchical data in a relational database, and make some operations easier. However, if your database supports recursive common table expressions, I would highly recommend using a standard tree structure instead. Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" 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/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
