As discussed with Damien Tournoud, it would be nice to implement reverse references which can be very useful in views for instance.

#1 relationships-1260930.patch3.17 KBbojanz
#1 reference.png22.33 KBbojanz


bojanz’s picture

Status:Active» Needs review
new22.33 KB
new3.17 KB

Views having a handler for this makes life so much easier.

Feel free to suggest better help text (see attached screenshot for how it looks now).
Perhaps the first one should be "A bridge to the User entity that is referenced from Content via field_user".

Damien Tournoud’s picture

Status:Needs review» Fixed

Thanks for the patch!

In my testing, it seems to work as advertized. Committed.

bojanz’s picture

I think you didn't push the commit.

Haza’s picture

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

larjohn’s picture

I have no idea how to use this functionality in Views. Could you please explain?

I have two content types, let's say

A{name, surname, reftoB}


B{title, height}

can I have a View that lists all A's instances that theri refB instance has a height>50?

EDIT: I just sat down and learnt to use Relationships...

sime’s picture

I love this module

nkurothe’s picture

Getting a warning after applying the patch and using it in one of the views

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of C:\xampp\htdocs\drupal7\includes\
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 of C:\xampp\htdocs\drupal7\includes\

Got it fixed by disabling some of the unused modules like Relations