Skip Navigation

[Resolved] many to many with 3 tabelles

This support ticket is created 7 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 0.77 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

Author
Posts
#442295
3 CPT for many to many_2.PNG
3 CPT for many to many.PNG

Hello,
I am trying to:

I have 3 tabelles: Fussballer (footballer), Trainer (coaches), Verein (club).

I need a relationship between all tables. There can be multiple footballer to coaches, as well as several trainers to clubs and footballer to clubs and coaches to clubs and so on. Basically, all the relationships are n: m relationships. have I really invested this in Toolset, like to see at the screenshots? Or will the queries be presented about views . The sample pages always be go from 2 tables as a logical.
I visited this URL:
https://toolset.com/documentation/user-guides/getting-started-views/part-9-many-many-relationships/

So how to do right?

#442626

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Henryk

Creating 3-way many-to-many relationships is possible, but complex.

Firstly, you should be aware that there are major changes coming to Toolset relating to post relationships which will make this kind of thing far easier to set up and much more efficient.

You will be able to create relationships without the need to make intermediary post types (and in your example you will currently need to create intermediary post types for A -- B, A -- C, and B -- C).

You can read more about it here: https://toolset.com/2016/08/how-post-relationship-replaces-post-reference-and-repeating-fields/

That work is ongoing and I don't have a release date for you, but if you can wait I would strong recommend you do.

If you cannot wait then you can go ahead and build your relationships as described here: https://toolset.com/documentation/user-guides/many-to-many-post-relationship/

There is no special handling required for connecting 3 CPTs. You will need an intermediate post type to join footballers to coaches, another to join footballers to clubs, and another to join footballers to clubs. You can set up your views etc as described in the linked documentation, but your data-entry to create all the intermediate posts is going to be somewhat tedious.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.