title: Doctrine 2 ORM\GeneratedValue(strategy="AUTO") not working
body: <p>I am using doctrine 2  with symfony3 and PostgresSQL database and I have a problem inserting values as the id is not incremented anymore.I have update the database  with:</p>
  
  <pre><code>php app/console doctrine:database:update --dump-sql
  php app/console doctrine:schema:update --force
  </code></pre>
  
  <p>But : I got </p>
  
  <pre><code>Nothing to update - your database is already in sync with the current entity metadata.
  </code></pre>
  
  <p>here is my class categorie : </p>
  
  <pre><code>class Categorie {
  /**
   * @var int
   * @ORM\Column(name="id", type="integer")
   * @ORM\Id
   * @ORM\GeneratedValue(strategy="AUTO")
   */
  private $id;
  
  /**
   * @var string
   * @ORM\Column(name="nom", type="string", length=255 , nullable=true)
   */
  private $nom;
  
  /**
   * @var string
   *
   * @ORM\Column(name="niveau", type="integer" , nullable=true)
   */
  private $niveau;
  
  /**
   * @var int
   *
   * @ORM\Column(name="ordre", type="integer" , nullable=true)
   */
  private $ordre;
  
  /**
   * @var string
   *
   * @ORM\Column(name="etat", type="string", length=255 , nullable=true )
   */
  private $etat;
  
  /**
   * @var string
   *
   * @ORM\Column(name="image",  type="string", length=255 , nullable=true )
   */
  
  private $image  = null ;
  
  
   /**
   * @var array
   *
   * @ORM\OneToMany(targetEntity="EK\PlateformeBundle\Entity\Categorie", mappedBy="categorie")
   */
  private $categories ;
  
  
  /**
   * @var array
   *
   * @ORM\OneToMany(targetEntity="EK\PlateformeBundle\Entity\Piece", mappedBy="categorie")
   */
  private $pieces ;
  
  /**
   * Constructor
   */
  public function __construct()
  {
      $this-&gt;categories = new ArrayCollection();
      $this-&gt;pieces = new ArrayCollection();
  }
  
   /**
   * @ORM\ManyToOne(targetEntity="EK\PlateformeBundle\Entity\Categorie", inversedBy="categorie")
   */
  private $categorie;
  
  
  /**
   * Get id
   *
   * @return int
   */
  public function getId()
  {
      return $this-&gt;id;
  }
  
  /**
   * Set nom
   *
   * @param string $nom
   *
   * @return Categorie
   */
  public function setNom($nom)
  {
      $this-&gt;nom = $nom;
  
      return $this;
  }
  
  /**
   * Get nom
   *
   * @return string
   */
  
  public function getNom()
  {
      return $this-&gt;nom;
  }
  
  /**
   * Set niveau
   *
   * @param string $niveau
   *
   * @return Categorie
   */
  public function setNiveau($niveau)
  {
      $this-&gt;niveau = $niveau;
  
      return $this;
  }
  
  /**
   * Get niveau
   *
   * @return string
   */
  public function getNiveau()
  {
      return $this-&gt;niveau;
  }
  
  /**
   * Set ordre
   *
   * @param integer $ordre
   *
   * @return Categorie
   */
  public function setOrdre($ordre)
  {
      $this-&gt;ordre = $ordre;
  
      return $this;
  }
  
  /**
   * Get ordre
   *
   * @return int
   */
  public function getOrdre()
  {
      return $this-&gt;ordre;
  }
  
  /**
   * Set etat
   *
   * @param string $etat
   *
   * @return Categorie
   */
  public function setEtat($etat)
  {
      $this-&gt;etat = $etat;
  
      return $this;
  }
  
  /**
   * Get etat
   *
   * @return string
   */
  public function getEtat()
  {
      return $this-&gt;etat;
  }
  
  /**
   * Set image
   *
   * @param string $image
   *
   * @return Categorie
   */
  public function setImage($image)
  {
      $this-&gt;image = $image;
  
      return $this;
  }
  
  /**
   * Get image
   *
   * @return string
   */
  public function getImage()
  {
      return $this-&gt;image;
  }
  
   /**
   * Get categories
   *
   * @return \Doctrine\Common\Collections\Collection
   */
  public function getAvailableCategories()
  {
      return $this-&gt;categories;
  }
  
  /**
   * Add categorie
   *
   * @param \EK\PlateformeBundle\Entity\Categorie $categorie
   *
   * @return Categorie
   */
  
  public function addCategorie( \EK\PlateformeBundle\Entity\Categorie $categorie)
  {
      $this-&gt;categories[] = $categorie;
  
      return $this;
  }
  
  /**
   * Remove categorie
   *
   * @param \EK\PlateformeBundle\Entity\Categorie $categorie
   */
  public function removeCategorie(\EK\PlateformeBundle\Entity\Categorie $categorie)
  {
      $this-&gt;categories-&gt;removeElement($categorie);
  }
  
  /**
   * Get categories
   *
   * @return \Doctrine\Common\Collections\Collection
   */
  public function getCategories()
  {
      return $this-&gt;categories;
  }
  
  /*
   *
   */
  public function __toString()
  {
      return $this-&gt;getNom();
  }
  
  
  
   /**
   * Set categorie
   *
   * @param \EK\PlateformeBundle\Entity\Categorie $categorie
   *
   * @return Categorie
   */
  
  
  
  public function setCategorie(\EK\PlateformeBundle\Entity\Marque $categorie = null)
  {
      $this-&gt;categorie = $categorie;
  
      return $this;
  }
  
  
  /**
   * Get categorie
   *
   * @return \EK\PlateformeBundle\Entity\Categorie
   */
  public function getCategorie()
  {
      return $this-&gt;categorie;
  }
  
  
    /**
   * Get pieces
   *
   * @return \Doctrine\Common\Collections\Collection
   */
  public function getAvailablePieces()
  {
      return $this-&gt;pieces;
  }
  
  /**
   * Add piece
   *
   * @param \EK\PlateformeBundle\Entity\Piece $piece
   *
   * @return Categorie
   */
  public function addPiece( \EK\PlateformeBundle\Entity\Piece $piece)
  {
      $this-&gt;pieces[] = $piece;
  
      return $this;
  }
  
  /**
   * Remove piece
   *
   * @param \EK\PlateformeBundle\Entity\Piece $piece
   */
  public function removePiece(\EK\PlateformeBundle\Entity\Piece $piece)
  {
      $this-&gt;pieces-&gt;removeElement($piece);
  }
  /**
   * Get pieces
   *
   * @return \Doctrine\Common\Collections\Collection
   */
  public function getPieces()
  {
      return $this-&gt;pieces;
  }  
  </code></pre>
  
  <p>}</p>
  
  <p>Whene I tried to insert data into database using insert sql command : </p>
  
  <pre><code>INSERT INTO public.categorie(nom, niveau, ordre)
  VALUES ('test',1,1);
  </code></pre>
  
  <p>I got this error : </p>
  
  <pre><code>ERREUR: une valeur NULL viole la contrainte NOT NULL de la colonne « id »
  </code></pre>
  
  <p>Thanks for your help</p>