Jump to:

3460 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » [Resolved] Dataobject Relationship Management - DataObjects Connection

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

Page: 1
Go to End
Author Topic: 667 Views
  • lankylint
    Avatar
    Community Member
    2 Posts

    [Resolved] Dataobject Relationship Management - DataObjects Connection Link to this post

    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

  • lankylint
    Avatar
    Community Member
    2 Posts

    Re: [Resolved] Dataobject Relationship Management - DataObjects Connection Link to this post

    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

    667 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.