title: Symfony 3 OneToMany relationship error
body: <p>i'm trying to create a OneToMany form, and the symfony profiler throws an entity error, here's the code:</p>
  
  <p>Tasks.php</p>
  
  <pre><code>&lt;?php
  
  namespace ShopBundle\Entity;
  
  use Doctrine\Common\Collections\ArrayCollection;
  use Doctrine\ORM\Mapping as ORM;
  /**
   * 
   *
   * @ORM\Entity
   * @ORM\Table(name="task")
   */
  class Tasks
  {
      /**
       * @ORM\Id
       * @ORM\Column(type="integer")
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      protected $id;
      /**
       * @ORM\Column(type="string", nullable=true,length=100)
       * 
       */
      protected $description;
      /**
       * @ORM\OneToMany(targetEntity="ShopBundle\Entity\Tags", cascade={"all"}, mappedBy="name")
       */
      protected $tags;
  
      public function __construct()
      {
          $this-&gt;tags = new ArrayCollection();
      }
  
      public function getId()
      {
          return $this-&gt;id;
      }
  
      public function setId($id)
      {
          $this-&gt;id = $id;
      }
  
      public function getDescription()
      {
          return $this-&gt;description;
      }
  
      public function setDescription($description)
      {
          $this-&gt;description = $description;
      }
  
      public function getTags()
      {
          return $this-&gt;tags;
      }
  
      public function addTag(Tags $tag)
      {
          $this-&gt;tags-&gt;add($tag);
      }
  
      public function removeTag(Tags $tag)
      {
          $this-&gt;tags-&gt;removeElement($tag);
      }
  }
  </code></pre>
  
  <p>this is the Tags.php</p>
  
  <pre><code>&lt;?php
  
  namespace ShopBundle\Entity;
  use Doctrine\ORM\Mapping as ORM;
  /**
   * 
   * @ORM\Entity
   * @ORM\Table(name="tag")
   */
  class Tags
  {
      /**
       * @ORM\Id
       * @ORM\Column(type="integer")
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      protected $id;
      /**
       * @ORM\ManyToOne(targetEntity="ShopBundle\Entity\Tasks", inversedBy="tags")
       * @ORM\JoinColumn(name="task")
       */
      protected $name;
  
      public function getId()
      {
          return $this-&gt;id;
      }
  
      public function setId($id)
      {
          $this-&gt;id = $id;
      }
  
      public function getName()
      {
          return $this-&gt;name;
      }
  
      public function setName($name)
      {
          $this-&gt;name = $name;
      }
  }
  </code></pre>
  
  <p>the profiler throws 2 errors:
  The association ShopBundle\Entity\Tasks#tags refers to the owning side field ShopBundle\Entity\Tags#name which is not defined as association, but as field.</p>
  
  <p>and</p>
  
  <p>The association ShopBundle\Entity\Tasks#tags refers to the owning side field ShopBundle\Entity\Tags#name which does not exist.</p>
  
  <p>it saves the data into the database, but i can't get the data from the database</p>