title: how to generate entities and schemas for enum in symfony
body: <p>i am trying to generate entities for my contact information. for that i have first create Entity with the following syntax used where i have created one enum field.</p>
  
  <pre><code>php app/console doctrine:generate:entity --entity="BannerTestBundle.contact" --fields="name:string(255) lastname:string(255) phone:integer(10) gender:enum("male","female") message:text".
  </code></pre>
  
  <p>The above command generate the entity class but when i am trying to generate "entities" from the class it will show error the command is.</p>
  
  <pre><code> php app/console doctrine:generate:entities Banner/TestBundle/Entity/contact
  </code></pre>
  
  <p>it will show the following error.</p>
  
  <pre><code>[Doctrine\Common\Annotations\AnnotationException]
  [Semantical Error] Couldn't find constant male, property Banner\TestBundle\
  Entity\contact::$gender.
  
  doctrine:generate:entities [--path="..."] [--no-backup] name
  </code></pre>
  
  <p>i want to generate database with following fields:</p>
  
  <pre><code>Contact.table
  Name-string(255)
  LastName-string(255)
  Phone:integer(10)
  gender:enum("male","female")
  message:text
  </code></pre>
  
  <p>please help into it as i am new in symfony</p>
  
  <p>Here is Contact Entity file</p>
  
  <pre><code> &lt;?php
  
    namespace Banner\TestBundle\Entity;
  
     use Doctrine\ORM\Mapping as ORM;
  
    /**
   * contact
   *
   * @ORM\Table()
   * @ORM\Entity(repositoryClass="Banner\TestBundle\Entity\contactRepository")
   */
   class contact
  {
  /**
   * @var integer
   *
   * @ORM\Column(name="id", type="integer")
   * @ORM\Id
   * @ORM\GeneratedValue(strategy="AUTO")
   */
  private $id;
  
  /**
   * @var string
   *
   * @ORM\Column(name="name", type="string", length=255)
   */
  private $name;
  
  /**
   * @var string
   *
   * @ORM\Column(name="lastname", type="string", length=255)
   */
  private $lastname;
  
  /**
   * @var enum
   *
   * @ORM\Column(name="gender", type="enum", length=male,female)
   */
  private $gender;
  
  /**
   * @var integer
   *
   * @ORM\Column(name="phone", type="integer", length=12)
   */
  private $phone;
  
  /**
   * @var string
   *
   * @ORM\Column(name="message", type="text")
   */
  private $message;
  
  
  /**
   * Get id
   *
   * @return integer 
   */
  public function getId()
  {
      return $this-&gt;id;
  }
  
  /**
   * Set name
   *
   * @param string $name
   * @return contact
   */
  public function setName($name)
  {
      $this-&gt;name = $name;
  
      return $this;
  }
  
  /**
   * Get name
   *
   * @return string 
   */
  public function getName()
  {
      return $this-&gt;name;
  }
  
  /**
   * Set lastname
   *
   * @param string $lastname
   * @return contact
   */
  public function setLastname($lastname)
  {
      $this-&gt;lastname = $lastname;
  
      return $this;
  }
  
  /**
   * Get lastname
   *
   * @return string 
   */
  public function getLastname()
  {
      return $this-&gt;lastname;
  }
  
  /**
   * Set gender
   *
   * @param \enum $gender
   * @return contact
   */
  public function setGender(\enum $gender)
  {
      $this-&gt;gender = $gender;
  
      return $this;
  }
  
  /**
   * Get gender
   *
   * @return \enum 
   */
  public function getGender()
  {
      return $this-&gt;gender;
  }
  
  /**
   * Set phone
   *
   * @param integer $phone
   * @return contact
   */
  public function setPhone($phone)
  {
      $this-&gt;phone = $phone;
  
      return $this;
  }
  
  /**
   * Get phone
   *
   * @return integer 
   */
  public function getPhone()
  {
      return $this-&gt;phone;
  }
  
  /**
   * Set message
   *
   * @param string $message
   * @return contact
   */
  public function setMessage($message)
  {
      $this-&gt;message = $message;
  
      return $this;
  }
  
  /**
   * Get message
   *
   * @return string 
   */
  public function getMessage()
  {
      return $this-&gt;message;
  }
  }
  </code></pre>