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.

Customising the CMS /

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

Table realtion: relation to relation to realtion


Go to End


1195 Views

Avatar
Jarek

Community Member, 30 Posts

13 May 2009 at 11:44pm

Hello

I've table that stores car information. I want to have model and mark data. The solution is to create Model and Mark tables:

Model -> has_one Mark
Mark -> has_many Model
Car (main table) -> has_one Mark

I've created additional Tab to define car Mark (in cms). On this tab is standard link "Add Mark". This links opens popup window where new Mark can be defined. How can I extend this popup to add Mark and Model at the same time (with adding correct relation beetwen Mark and Model)?

I can define direct relation beetwen Car and Model but this is redundant.

Thx for any help