In a Drupal 7 website I would like to create an "is similar to" relation between nodes of the same content type. The nodes are vessels (ships) and a vessel can be similar to several others.

Think of the similarity as a Volkswagen Golf I is similar to the VW Golf II, Golf III and so on. The relation is symmatric, because the VW Golf IV is similar to the Golf VII and vice versa.

In the current custom made website, which will be migrated to Drupal 7, there are over 6500 relations between vessels.

I've tried several modules, but I can not create what I intend:

  • the Relation module can not create relations between endpoints of the same entity type (e.g. nodes of the same content type);
  • the module Entity reference only creates directional relations. This would mean creating two references per relation, ending up with over 13000 references;
  • the References module also only creates directional relations, again ending up with over 13000 references.

So the question is: how do I create non-directional/symmetric relations between nodes of the same content type?

  • I think I've seen my answer getting accepted and un-accepted. If it does not meet your needs, please explain why, and I'll try to update it.
    – Mołot
    Commented Aug 22, 2014 at 9:48
  • 1
    that's correct; I accepted it but realised I haven't tested it yet. I think your answer is correct, but I want to be sure, so others can benefit from it as well. Thanks for your swift anser, btw! Commented Aug 22, 2014 at 9:59
  • OK, sounds fair. I was afraid you unaccepted because you found it somehow faulty, but if it was the case of accepting too soon, you did exactly what you should.
    – Mołot
    Commented Aug 22, 2014 at 10:00

1 Answer 1


Corresponding entity references fixes this for you:

CER keeps reference fields in sync. If you have two entities that refer to each other using Entity Reference (or some other kind of reference field), it saves you the trouble of double-editing your entities in order to have them point at each other. If entity Alice references entity Bob, CER will make Bob reference Alice, and keep the references up-to-date when either entity is updated or deleted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.