title: Doctrine2: undefined index
body: <p>When I try to execute this DQL query:</p>
  
  <pre><code>SELECT r, s FROM Rule r
  JOIN r.splash_page s
  WHERE r.active = 1
  </code></pre>
  
  <p>What I'm trying to do is just join two Entities and I get this error:</p>
  
  <pre><code>Notice: Undefined index: rules in C:\xampp\htdocs\excap\vendor\doctrine\orm\lib\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php on line 110
  Notice: Undefined index: rules in C:\xampp\htdocs\excap\vendor\doctrine\orm\lib\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php on line 428
  Notice: Undefined index: rules in C:\xampp\htdocs\excap\vendor\doctrine\orm\lib\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php on line 428
  Notice: Undefined index: rules in C:\xampp\htdocs\excap\vendor\doctrine\orm\lib\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php on line 428
  Notice: Undefined index: rules in C:\xampp\htdocs\excap\vendor\doctrine\orm\lib\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php on line 428
  </code></pre>
  
  <p>These are part of my Entity files where I declare the relation between them:</p>
  
  <pre><code>// Rule.php 
  /**
   *
   * @var type 
   * @ManyToOne(targetEntity="SplashPage", inversedBy="rules")
   */
  protected $splash_page;
  </code></pre>
  
  <hr>
  
  <pre><code>// SplashPage.php
  /**
   *
   * @var type
   * OneToMany(targetEntity="Rule", mappedBy="splash_page") 
   */
  protected $rules = null;
  </code></pre>
  
  <p>Any idea why is this happening?</p>