title: How to get associations in Doctrine entity?
body: <p>I hope it's possible in Doctrine2. I know Propel does that automatically. What I want to do is this:</p>
  
  <p>I have two tables:</p>
  
  <pre><code>workflow (id, name)
  inbox (id, workflow_id, name)
  </code></pre>
  
  <p>And two entities:</p>
  
  <pre><code>Workflow and Inbox
  </code></pre>
  
  <p>In my Inbox entity I, of course, have this (to relate two tables):</p>
  
  <pre><code>  /**
     * @ORM\ManyToOne(targetEntity="Workflow")
     * @ORM\JoinColumn(nullable=false)
     */
    protected $workflow;
  </code></pre>
  
  <p>Everything works great. However, I want to be able to get inboxes from the Workflow entity that are associated with that workflow. I can't find how to do it. </p>
  
  <p>Propel does that very simple, you would just do something like this: </p>
  
  <pre><code>$workflow = WorkflowQuery::create()
    -&gt;filterById(1)
    -&gt;findOne(1);
  
  $inboxes = $workflow-&gt;getInboxs() 
  //Propel just addes 's' to methods that return associations
  </code></pre>
  
  <p>How, similar this can be done in Doctrine2? Something like this:</p>
  
  <pre><code>$workflow = $this-&gt;getRepository('MyBundle:Workflow')-&gt;findById(1);
  $inboxes = $workflow-&gt;getInboxes();
  </code></pre>
  
  <p>So, is there a way to do this? Thank you.</p>