title: JPA2: create-or-extend-tables is not extending existing table with new column
body: <p>I am using <code>JPA2</code>, <code>EclipseLink</code>. I am trying to add a new column to the existing database and table. I added a new field in POJO class MyTable. Inspite of having <code>create-or-extend-tables</code> properties, the new column is not getting added up. </p>
  
  <p>Here is my <code>persistence.xml</code> file.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"&gt;
      &lt;persistence-unit name="idpersistance"&gt;
      &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
  
  &lt;class&gt;com.id.service.db.pojo.AppTable&lt;/class&gt;
  &lt;class&gt;com.id.service.db.pojo.MyTable&lt;/class&gt;
  
  &lt;properties&gt;
  &lt;property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"&gt;&lt;/property&gt;
  &lt;property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:2705/mydb"&gt;&lt;/property&gt;
  &lt;property name="javax.persistence.jdbc.user" value="user"&gt;&lt;/property&gt;
  &lt;property name="javax.persistence.jdbc.password" value="password"&gt;&lt;/property&gt;
  
  &lt;property name="eclipselink.ddl-generation" value="create-or-extend-tables" /&gt; 
  &lt;property name="eclipselink.ddl-generation.output-mode" value="database" /&gt;
  &lt;property name="eclipselink.id-validation" value="NULL"&gt;&lt;/property&gt;
  &lt;property name="eclipselink.logging.level" value="FINE"/&gt;
  &lt;property name="javax.persistence.lock.timeout" value="1000"/&gt;
  &lt;property name="eclipselink.target-database" value="MySQL"/&gt;
  
  &lt;/properties&gt;
  
  &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>I am not sure why the new column is not getting added. I am getting back following error:</p>
  
  <pre><code> Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
   Internal Exception: java.sql.SQLException: null,  message from server: "Unknown column 'newcol' in 'field list'"
   Error Code: 1054
  </code></pre>
  
  <p>The <code>jar</code> file that I am using:</p>
  
  <pre><code> eclipselink.jar (2.5.2)
   javax.persistence_2.1.0.v201304241213.jar
  </code></pre>
  
  <p>Please let me know if any thing missing in my <code>persistence.xml</code> file.</p>
  
  <p>Any help is Appreciated.</p>
  
  <p><strong>Update:</strong>
  I had debugged into <code>EclipseLink</code> code and found that it is not attempting to generate new columns, it throws an error at <code>extendDefaultTables()</code> method in <code>EntityManagerFactoryProvider</code> class and says table already exists and returns from that method. </p>
  
  <p>There is a field called <code>useExternalConnectionPooling</code> in <code>incrementCallCount()</code> method of <code>DatasourceAccessor</code> class, if I set this field to true manually. Then new columns are getting generated successfully. Because of the field is false, <code>EclipseLink</code> is not triggering extend. I am not sure, if this is correct field to go with. </p>