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-Relation: How to add details?


Reply


2 Posts   1846 Views

Avatar
NicolasLeuenberger

Community Member, 10 Posts

2 March 2009 at 10:36am

Hi,

I'm building a homepage for our actors group. I've got a page class ActorPage on which I display a list of the plays this actor has been in. To do this, I've installed a many-many-relation to the PlayPage class.
So far so good, this works.

But now I would like to add additional information to this relation: Which was the team members role?
I have no idea how to achieve this. I guess the information should be stored in the playpage_actorpages table in the database where the relation is stored. But is there a way to write to that database?

Any help is appreciated.

Thanks, Nicolas

Avatar
dospuntocero

Community Member, 54 Posts

5 March 2009 at 12:19am

Hi Nicolas, you need to store the additional data using DataObjects, [url=http://doc.silverstripe.com/doku.php?id=tutorial:5-dataobject-relationship-management] look in the tutorial for dataobjects - relationships [/url]

good luck!