title: Wrong datatype for referenced entity on Doctrine ObjectSelect
body: <p>I have a form which uses Doctrine's ObjectSelect to make a dropdown</p>
  
  <pre><code>$this-&gt;add(array(
          'name' =&gt; 'category',
          'type' =&gt; 'DoctrineModule\Form\Element\ObjectSelect',
          'options' =&gt; array(
              'label' =&gt; 'Category',
              'object_manager' =&gt; $em,
              'target_class' =&gt; 'Blog\Entity\Category',
              'property' =&gt; 'name'
          ),
          'attributes' =&gt; array(
              'required' =&gt; true
          )
   ));
  </code></pre>
  
  <p>the issue I have, is that this should reference the id of another entity, howeve it keeps throwing 
  "Expected value of type "Blog\Entity\Category" for association field "Blog\Entity\Post#$category", got "string" instead."</p>
  
  <p>here´s the var_dump from the form, the important part</p>
  
  <pre><code>object(Zend\InputFilter\InputFilter)[337]
    protected 'factory' =&gt; null
    protected 'data' =&gt; 
      array (size=5)
        'id' =&gt; string '' (length=0)
        'title' =&gt; string 'asdasd' (length=6)
        'content' =&gt; string '&lt;p&gt;asdasd&lt;/p&gt;' (length=13)
        'category' =&gt; string '3' (length=1)
        'submit' =&gt; string 'Add' (length=3)
  </code></pre>
  
  <p>and my addAction</p>
  
  <pre><code>public function addAction()
  {   
      $form = new PostForm($this-&gt;getEntityManager());
      $form-&gt;setHydrator(new DoctrineEntity($this-&gt;getEntityManager(),'Blog\Entity\Post'));
  
      $form-&gt;get('submit')-&gt;setValue('Add');
  
      $request = $this-&gt;getRequest();
      if ($request-&gt;isPost()) {
          $post = new Post();
          $form-&gt;setInputFilter($post-&gt;getInputFilter());
          $form-&gt;setData($request-&gt;getPost());
  
          $form-&gt;isValid();
          //debug
          var_dump($post);
  
          $post-&gt;exchangeArray($form-&gt;getData());
          $em = $this-&gt;getEntityManager();
          $em-&gt;persist($post);
          $em-&gt;flush();
          $this-&gt;flashMessenger()-&gt;addSuccessMessage('Post Saved');
          return $this-&gt;redirect()-&gt;toRoute('post');
      }
       return new ViewModel(array(
          'post' =&gt; $post,
          'form' =&gt; $form
      ));
  }
  </code></pre>
  
  <p>How would I solve this, I don't get how it doesn't complain about the ids but for this it does.</p>
  
  <p>UPDATE ** category entity ORM anotations</p>
  
  <pre><code>/**
   *
   * @ORM\ManyToOne(targetEntity="Category")
   * @ORM\JoinColumn(name="category_id", referencedColumnName="id")
   */
  private $category;
  </code></pre>