Reverse nodereference

Events happening in the community are now at Drupal community events on www.drupal.org.
mlncn's picture

There are several modules that help you list referencer nodes on the referencee node.

Two in particular take it seems the same approach of creating actual reverse nodereferences, so that each nodereference becomes a symmetrical relationship (rather than helping you see the implied relationship).

BackReference itself does the due diligence of comparing similar projects on its project page so... why not join forces?

An issue on BackReference about similar modules is here: http://drupal.org/node/554446

ben, agaric

Comments

markus_petrux's picture

One thing is the ability to display a list of back references in the referred nodes.

Here, I would like to add to the list of existing solutions the Node Relationships module. It allows you to show back references in the referred nodes using dynamically configured views that you can extend to suit your needs. You can display these views using several methods in the node view, including one the turns this view into a CCK field that you can place wherever you wish in the "Manage fields" screen.

I added this feature to Node Relationships because other solutions require you to duplicate relationship related data, which is IMHO bad design, because it's a source of possible database inconsistencies and increased cost to maintain relationships to keep them in sync.

CCK was recently enhanced to automatically create indexes for the node reference columns, so the joins implied here can take advantage of this.

Another thing is reverse relationships in Views. This is a bit more complex that it seems. This kind of relationships should allow you to create joins from referred to referrer nodes. This has been discussed on the CCK issues queue: Reverse node-reference views relationship. In summary: in order to avoid duplicate records when the referrer nodes support revisions, then a nested join can help, but this is not supported until MySQL 5.1. It would be nice to figure out a different method to solve this using pure SQL, and then try to find its way into Views.

Edit single reference from either node?

scottatdrake's picture

One thing that Node Relationships doesn't do that BackReference and Corresponding Node References do, is allow you to add/edit a reference from either node, and have that immediately reflected in the other.

Am I correct there?

markus_petrux's picture

However, I think the other modules do, which is prone to generate inconsistencies.

You may not need a reverse reference physically on the other side, specially when you have the tools that allow you to travel in any direction with the relationship data on just one side.

This is a new module that also helps in this direction:

http://drupal.org/project/reverse_node_reference

Corresponding node references

domidc's picture

Corresponding node references version 6.4 makes cck handle the number of references http://drupal.org/project/cnr

Similar Module Review

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week