title: Generating next sequence value manually in Doctrine 2
body: <p>What would be the easiest way to generate <code>nextval</code> for some particular sequence with given name?</p>
  
  <p>The annotation solution with specifying</p>
  
  <pre><code> * @ORM\GeneratedValue(strategy="SEQUENCE")
   * @ORM\SequenceGenerator(sequenceName="sq_foobar", allocationSize="1", initialValue="1")
  </code></pre>
  
  <p>doesn't satisfy me, as long as there is some more complex logic involved: in some cases I need to retrieve <code>nextval</code>, in other - I would go with the value retrieved from another sources (not sequence).</p>
  
  <p>So I hope there is a way to retrieve a sequence nextval manually in entity's constructor.</p>