You probably heard us mentioning the upcoming support for many-to-many relationship in Toolset. Finally, we have a first working part, which I want to share with you.

To set-up relationships, you’ll go to Toolset->Relationships. There, you will see the existing relationships and can create new ones.

You will be able to set-up different kinds of relationships:

  • One to one – This is a bit less intuitive, but also useful. One-to-one relationships intend to extend a single object, without hanging more fields on it. It’s good when an object has several kinds of optional fields, which should appear only in specific cases.
  • One to many – This is what Toolset had until now. You could set up a parent/child relationship, which is a different name for one-to-many.
  • Many to many – This is what many Toolset clients have been asking for. You’ll be able to easily connect many items of one kind to many items of another and vice versa.

All relationships will have names (which the parent/child method that we have today doesn’t). It’s important because it means that you reference the relationship by its name. Therefor, you can have more than one relationships between the same object types.

For example:

  • Arrivals – between airports and flights
  • Departures – also between airports and flights

When you’re displaying the “airport” page, you will be able to list “arrivals” and “departures”, even though both refer to flights.

Until now, relationships used custom fields. This is fine for smaller sites, but causes a performance problem for big sites. The new implementation uses a custom table for relationships. This means super-fast-performance, even for the largest WordPress sites.

Next month we’ll send another update of our progress. We plan to have the repeating fields group (which set up an implicit one-to-many relationship) and the complete wizard for setting up relationships.

Ideas? Thoughts? Questions? Leave your comments and I’ll get back to you.