Relationships in Views always 4 results also if no reference for the field I have two content types :


meals
wine


In my content-type "meals" I have a entity reference to "wine".

Now I wanna create a views to show all meals, with a reference to wine.

I have create a views with following settings:


  FILTER CRITERIA
  
  = Content Type (= meals)
  
  = (Content entity referenced from field_wine) Content: Published (Yes)
  
  RELATIONSHIPS
  
  = Entity Reference: Wine


In my view I get all results for that. So if a wine was tagged in 2 meals, I get a view with that two meals.

My Problem now: I always wanna show 4 meals. So I want to show the 2 meals + 2 others.

If i have a wine with 1 meals. So i want so show the 1 meal + 3 others.. and so on.

Do any know how to fill the results if the missing some meals?
I think the best way to do via https://www.drupal.org/project/views_field_view . So, below is the steps:-


Create a view for the meal which shows all meals and add one more field "nid" as a hidden parameter(just tick exclude from display) so that we will have an available token for nid.
Now, create another block of wine and pass meal's nid as a contextual fitler. so, it will give you all wine as per single meals.
The next step do the trick. Go back to block #1(meal's view) and and add global:view field and pass "[nid]" of the meal as a contextual filter in that field(you will find an option don't worry) and select the view and display of the #2(wine's block).
That's it, here you have all the meals with wines. :)


Hope it will solve your problem.