I’ve dug through Google extensively and cannot find a clear, concise answer for this.
ExpressionEngine is powerful, but this one glaring blind spot is almost enough to look elsewhere when choosing a framework…
My Problem
I’ve got a Products channel. I want to allow Products to be related to other Products in a bi-directional, many-to-many way. In Rails terms this would be a has_and_belongs_to_many relationship, in SQL it’d be a JOIN table. Essentially I need to link/bind the two entries together, neither being the “parent” or “child” of the either — and I need to do it in a way where I’m defining the relationship once, not twice (relating A => B should implicitly relate B => A).
Example scenario
Given that... Product entries have a related_products field (relationship? playa? matrix?)
Given that... There are two Product entries: Guitar Strings and Guitar Strings
When I... Edit the Guitar entry’s related_products field to include Guitar Strings entry
I expect... The Guitar Strings entry’s related_products to now include Guitar Strings entry
So That... In templates, Guitar:related_products returns Guitar Strings, and conversely Guitar Strings:related_products returns Guitar
So… WTF?
I purchased Playa and Matrix, the two recommended add-ons for “complex” data relation problems. But I’m extremely disappointed that they don’t intuitively solve this.
Am I missing something? The old documentation for Playa shows a reverse_related_entries tag — that sounds/looks like exactly what I need… but it was deprecated since EE2.0
Do I need to create a new channel called “Product Relation”, with just 2 Single Select Playa fields, so I can lookup all relationships that include any given Product? This seems like a highly inelegant solution.
Any guidance would be much appreciated… this may be a show stopper for me in the future when I think about using EE for my sites