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

[Resolved] Dataobject Relationship Management - DataObjects Connection


Go to End


2 Posts   1147 Views

Avatar
lankylint

Community Member, 3 Posts

30 November 2011 at 8:00am

Greetings everyone,

I followed this tutorial to create a table of objects which have a one-to-many relationship with a page, like the implementation of Mentors in the above tutorial.

However, I don't want the rows associated to a Page to show up on other Pages (like they do with Mentors), rows are completely unique to a page.

Summary,
Page one-to-many-> DataObjects
DataObjects one-to-one-> Page

Currently: NewPage Creation -> Non-selectable DataObjects from other Pages
Goal: NewPage Creation -> Empty Table

Avatar
lankylint

Community Member, 3 Posts

30 November 2011 at 9:52am

Kudos to Pyromanik for sorting this out over IRC.

For anyone who's having issues with this,

Just substitute the HasManyComplexTableField with a complexTableField.

The automatic relationship management should sort out the hasMany relationship, provided that you have a valid relative one-to-one relationship between the DataObject and the page