Score:1

Why do relationships return only one result?

ro flag

I am using Drupal 7. I created a view that uses 8 different (chained) relationships to access a specific entity type. Then, the view displays some fields of this entity type. The view has some filter criteria as well (making sure the fields of the entity type are not deleted), and a Contextual filter on the logged-in user's ID.

The first relationship of that view takes the user ID and makes available a "person" entity with this ID. Then, for example, this person entity has a (second) relationship to their employer, and the employer has a (third) relationship to all the "Cases" they have. I want to access these Case entities in the view, and display some of their attributes (fields).

Now my problem is that all of the views I created this way only give back one result (Case) each. Specifically, they return only the fields of the "first" Case entity (Case entity with the lowest Case ID) that meets the given filter criteria.

I tried to remove some of the relationships from the view, to check if a list of entities is reduced to its first item somewhere along the way through the relationships. The problem already appears in the first relationship that is supposed to output multiple values. I didn't find any helpful resources.

How can I include all the results?

I also appreciate hints for better search words for this problem.

cn flag
Content type A has a relationship to content type B, and you create a view of content type A with a filter on content type B. When you say you only get one result, do you mean you only get one result for content type A, or only one result for content type B? (Is the view only returning a single result for the entire view, or is the view only returning one result per content type for each content type that has a multi-value entity reference?)
emma avatar
ro flag
The view is only returning a single result for the entire view. I get one line in a table where I should have multiple lines. The table cells are correct though. I don't have multi-value entity fields included for now, so I can't tell if that would be a problem too. (I tried to further clarify my question.)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.