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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Many_many or Has_many relationships

Go to End



Community Member, 545 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?