Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions /

Many_many or Has_many relationships


Reply


890 Views

Avatar
zenmonkey

Community Member, 528 Posts

30 September 2009 at 6:05am

I'm having trouble with creating the right relationship.

I have a Product Page Type and Top10 Page Type

The site will have multiple Top 10 pages each with Multiple Products Linked to It. Any Given Product Page can be inked to more than one Top10 Page. The kicker is I need a way to order the products on the Top10 pages. So each top 10 page could have Number10, Number9 object etc.

Would the best way be to create Each Rank as a DataObject,

Each Rank would has_one Product Page
Each Top10 Page would has_one Each Rank
Each Product would has_many Each Rank
Each Top10 Page many_many Products
Each Product belongs_many_many Top10

Does that make sense?