title: Doctrine: Explicitly giving primary key value while not changing the auto increment
body: <p>There is a table with many columns along with primary key column 'id' having auto increment attribute.
  The database is mySQL.</p>
  
  <p>There are two kinds of PHP code that are inserting in that column.
  1.) Normal insert queries are created as string and are executed by making ADO connection to the database.In this case, primary key value is not provided so it uses the table's auto increment value.</p>
  
  <p>2.) There is an php symfony doctrine's entity class with primary field declared as</p>
  
  <pre><code>/**
       * @var int
       *
       * @ORM\Column(name="id", type="integer", nullable=false)
       * @ORM\Id
       */
      private $id;
  </code></pre>
  
  <p>The insertion uses the entity manager's persist method.
  Here while inserting, <strong>the id value is explicitly provided</strong> which is far greater than the column's auto increment value. That's why the Generation_Type is ommited in the annotations.</p>
  
  <p>Now, let's say the current auto_increment value is 10000.
  I want that while executing the first scenario, the next id is taken as 1001 which is expected.
  But in case of executing the second scenario with explicit id = 2000, it inserts the record with 2000 but does not change the auto_increment to 2000. It should still remain to 1001.</p>
  
  <p>Do I have to make changes around this piece of code?</p>
  
  <pre><code>$this-&gt;em-&gt;persist(obj);
  </code></pre>
  
  <p>Thanks in advance.</p>