This project is read-only.

Bidirectional Relationships n-n between contenttypes

Topics: Administration, General
Aug 7, 2014 at 11:12 AM
Edited Aug 7, 2014 at 11:15 AM
Which is the right way to make a many to many relationship between ContentItems?

For example I have to make a relationship between Producer and Product in order to be able to get:
  1. From Producer, his own products
  2. From Product, which producers own it
My approach was
Producer with ContentPickerField
Product with ContentPickerFieldConnector (custom part) that makes a query (by projection services) over FieldindexRecord

There is a better solution?

Thank you.
Aug 7, 2014 at 11:40 AM
First of all you should read the following article:

Besides that, take a look at the following (old!) module:

Maybe it can give you some inspiration on how to get around the many to many relationship.
Aug 8, 2014 at 11:28 AM
What you suggest was in fact my approach.

but n-n relationship its not useful in my case (I dont want a db relationship but a logical relationship between contentitems)
and mechanics seems not working on 1.7.2

so my questi on is:
Which is the Best way TO create relationships between content items? Using a content picker field? There are alternatives? And if i would like a backward relationship child-> parents what should I do?

Any suggestion is appreciated. Thanks.