title: How to ManyToMany and OneToMany in Symfony and Doctrine?
body: <p>I find the documentation very poor when it comes to explaining the creation of relationships between entities. So, i'll have to ask for help to my fellow StackExchangers. So, i'm trying to build the following cases: </p>
  
  <p><strong>Case 1</strong></p>
  
  <p>A <code>User</code> belongs to one or more <code>Group</code>, and a <code>Group</code> can have many <code>Permission</code>. A <code>User</code> also can have a <code>Permission</code>.</p>
  
  <p><strong>Case 2</strong></p>
  
  <p>A <code>Ticket</code> has a <code>Category</code>, multiple <code>Tag</code> and multiple <code>Comment</code>.  </p>
  
  <p>Thanks in advance!</p>