title: Class Doctrine\Common\Collections\ArrayCollection is not a valid entity or mapped super class
body: <p>I have Three entities:</p>
  
  <p>FeatureValue.php</p>
  
  <pre><code>&lt;?php
  
  namespace Webmuch\ProductBundle\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * @ORM\Entity
   */
  class FeatureValue
  {
  /**
   * @ORM\Id
   * @ORM\Column(type="integer")
   * @ORM\GeneratedValue(strategy="AUTO")
   */
  protected $id;
  
  /**
   * @ORM\Column(type="string", length="100")
   */
  protected $name;
  
  /** 
   * @ORM\OneToMany(targetEntity="FeatureType", mappedBy="name")
   */
  private $featuretype;
  
  
  
  public function __construct()
  {
      $this-&gt;featuretype = new \Doctrine\Common\Collections\ArrayCollection();
  }
  </code></pre>
  
  <p>FeatureType.php</p>
  
  <pre><code>&lt;?php
  
  namespace Webmuch\ProductBundle\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  use Webmuch\ProductBundle\Entity\FeatureValue;
  
  /**
   * @ORM\Entity
   */
  class FeatureType
  {
  /**
   * @ORM\Id
   * @ORM\Column(type="integer")
   * @ORM\GeneratedValue(strategy="AUTO")
   */
  protected $id;
  
  /**
   * @ORM\Column(type="string", length=255, nullable=true)
   */   
  protected $title;
  
  /** 
   * @ORM\ManyToOne(targetEntity="FeatureValue", inversedBy="featuretype",cascade={"persist"})
   * @ORM\JoinColumn(name="feature_value_id", referencedColumnName="id")
   */    
  protected $name;
  
   public function __construct() 
  {
      $this-&gt;name = new \Doctrine\Common\Collections\ArrayCollection();
  }
  </code></pre>
  
  <p>Product.php</p>
  
  <pre><code>&lt;?php
  namespace Webmuch\ProductBundle\Entity;
  
  use Gedmo\Mapping\Annotation as Gedmo;
  use Doctrine\ORM\Mapping as ORM;
  use Doctrine\Common\Collections\ArrayCollection as ArrayCollection;
  
  /**
   * @ORM\Entity
   * @ORM\Table()
   * @ORM\HasLifecycleCallbacks
   */
  class Product 
  {
  /**
   * @ORM\Id
   * @ORM\Column(type="integer")
   * @ORM\GeneratedValue(strategy="AUTO")
   */
  protected $id;
  
  /**
   * @ORM\ManyToMany(targetEntity="Store")
   */
  protected $store;
  
  /**
   * @ORM\ManyToMany(targetEntity="Webmuch\CategoryBundle\Entity\Category")
   */
  protected $category;
  
  /**
   * @Gedmo\Sluggable
   * @ORM\Column(type="string", length=255)
   */
  protected $title;
  
  /**
   * @Gedmo\Slug(updatable=false, unique=true)
   * @ORM\Column(type="string", length=255)
   */
  protected $slug;
  
  /**
   * @ORM\Column(type="integer")
   */
  protected $quantity;
  
  /**
   * @ORM\Column(type="boolean")
   */
  protected $active;
  
  /**
   * @ORM\Column(type="text", length="4000", nullable="true")
   */
  protected $preview;
  
  /**
   * @ORM\ManyToMany(targetEntity="FeatureType")
   * @ORM\JoinColumn(name="feature_type_id", referencedColumnName="id")
   */
  protected $features;
  
  public function __toString()
  {
      return $this-&gt;getTitle();
  }
  
  }
  </code></pre>
  
  <p>My problem is that when i add FeatureValue in FeatureType then show me error Class "Doctrine\Common\Collections\ArrayCollection is not a valid entity or mapped super class."</p>
  
  <p>In my project i want FeatureType along with FeatureValue in my Product entity.</p>
  
  <p>suppose in FeatureType two property Size and Colour.Now in FeatureType Size- Three FeatueValue Small,Medium,Large have been given and also suppose in FeatureType Colour- Three FeatureValue Red,Green,Yello have been given.
  Now i want to show both the FeatureType along with their FeatureValue in my Product Entity.</p>
  
  <p>So any one tell me how it can be done.I have tried a lot of but not succeed.</p>