diff --git a/views/relation_handler_relationship.inc b/views/relation_handler_relationship.inc
index b708af5..43812c4 100644
--- a/views/relation_handler_relationship.inc
+++ b/views/relation_handler_relationship.inc
@@ -92,7 +92,7 @@ class relation_handler_relationship extends views_handler_relationship {
     }
     else {
       // The other table is relation.
-      $join->definition['field'] = 'entity_id';
+      $join->definition['field'] = 'endpoints_entity_id';
     }
     if ($this->definition['directional'] && $this->options['r_index'] > -1) {
       $join->definition['extra'][] = array(
