title: Symfony 2 relations issue
body: <p>I nead help. </p>
  
  <p>I have 3 entities. Book, Category And BookCategory - book can have multiple categories so i used another table.</p>
  
  <p>I can easily acces Book and Category useing BookCategory table but i dont know how to do this by Book->BookCategory->Category.</p>
  
  <pre><code>    class Category
  {
      /**
       * @var integer
       *
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      private $id;
  
      /**
       * @var string
       *
       * @ORM\Column(name="name", type="text")
       */
      private $name;
  
       /**
        * @var Category
        * @ORM\ManyToOne(targetEntity="Category", inversedBy="Category")
        * @ORM\JoinColumn(name="parent", referencedColumnName="id")
        */
      private $parent;
  
  class BookCategory
  {
      /**
       * @var integer
       *
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      private $id;
  
       /**
        * @var Book
        * @ORM\ManyToOne(targetEntity="Book", inversedBy="BookCategory")
        * @ORM\JoinColumn(name="book_id", referencedColumnName="id")
        */
      private $bookId;
  
       /**
        * @var Category
        * @ORM\ManyToOne(targetEntity="Category", inversedBy="BookCategory")
        * @ORM\JoinColumn(name="category_id", referencedColumnName="id")
        */
      private $categoryId;
  
      /**
       * @var integer
       *
       * @ORM\Column(name="priority", type="integer")
       */
      private $priority;
  
  class Book
  {
      /**
       * @var integer
       *
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      private $id;
  
      /**
       * @var string
       *
       * @ORM\Column(name="title", type="text")
       */
      private $title;
  
      /**
       * @var string
       *
       * @ORM\Column(name="author", type="text")
       */
      private $author;
  
      /**
       * @var float
       *
       * @ORM\Column(name="price", type="float")
       */
      private $price;
  </code></pre>
  
  <p>How i need to config my entities or how to make my DQL to achive wanted results?</p>