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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

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

[Resolved] Dataobject Relationship Management - DataObjects Connection


Go to End


2 Posts   1426 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