title: Symfony 3.3.9 - problems with displaying relations
body: <p>I have troubles with displaying relations between entities.
  I have the following entities:
  Category
  Seminar
  Topic</p>
  
  <p>There is a ManyToOne between Seminar and Category (each seminar belongs to exact one category) and a ManyToMany between Seminar and Topic (each seminar can have several topics). The relations are working because the modification of seminars works like a charm.</p>
  
  <p>Now I want to display a list based on topics and categories:</p>
  
  <p>Topic
  -> Category
     -> Seminar</p>
  
  <p>As you could imagine it is no problem to iterate over the topics to get all seminars but I want to iterate over the topics to show a list of all used categories for the seminars with this specific topic. 
  I have no clue on how to create the needed query (or whatever is needed). I have a good idea how it would look like in pure SQL but not with doctrine.</p>
  
  <p>Any help is greatly appreciated</p>
  
  <p>Thanks in advance</p>
  
  <p>Sebastian</p>
  
  <p>UPDATE:
  The output should be a stacked list of DIVs or similar as a navigation (for easier writing shown with lists):</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li class="topic"&gt;Topic1
      &lt;ul class="category"&gt;Category3(because 1 and 2 do not contain seminars with this topic)
        &lt;li&gt;Seminar 17&lt;/li&gt;
        &lt;li&gt;Seminar 31&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li class="topic"&gt;Topic3 (because there are no seminars with Topic2)
      &lt;ul class="category"&gt;Category3
        &lt;li&gt;Seminar 8&lt;/li&gt;
        &lt;li&gt;Seminar 24&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>In SQL I would do something like (I do not show the ManyToMany between topics and seminars for easier writing and understanding):</p>
  
  <pre><code>select t.*, c.*, s.* 
      from Topics t 
          inner join seminars s on t.id=s.topicId
          inner join categories c on c.id=s.categoryId
      order by t.id, c.id, s.id
  </code></pre>
  
  <p>and of course I have to deal with the equal topics and categories during rendering.</p>