title: JPA script generation duplication statements
body: <p>I am using JPA (hibernate implementation) with spring in a project. When running automated test the <code>persistance.xml</code> is configured through spring to generate the create and drop scripts for the database.</p>
  
  <p>There is only one entity called <code>Book</code>. That should create one line in the create script to create the table <code>Book</code> and one line in the drop script to drop the table <code>Book</code>.</p>
  
  <p>The problem is that everytime i run the tests the scripts are not regenerated but instead a new line is added to the script. So if I run the test 3 times the script looks like:</p>
  
  <pre><code>create table Book (title varchar(255) not null, primary key (title))
  create table Book (title varchar(255) not null, primary key (title))
  create table Book (title varchar(255) not null, primary key (title))
  </code></pre>
  
  <p>These are the persistance configuration values</p>
  
  <pre><code>    &lt;!-- C3p0 datasource with connection pool configuration --&gt;
  &lt;bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"&gt;
      &lt;property name="driverClass" value="${jdbc.driverClassName}" /&gt;
      &lt;property name="jdbcUrl" value="${jdbc.url}" /&gt;
      &lt;property name="user" value="${jdbc.username}" /&gt;
      &lt;property name="password" value="${jdbc.password}" /&gt;
      &lt;property name="maxPoolSize" value="20" /&gt;
      &lt;property name="minPoolSize" value="5" /&gt;
      &lt;property name="maxStatements" value="50" /&gt;
  &lt;/bean&gt;
  
      &lt;bean id="EntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
      &lt;property name="jpaVendorAdapter" ref="JpaAdapter" /&gt;
      &lt;property name="persistenceUnitName" value="com.test.domain.PU" /&gt;
      &lt;property name="jpaPropertyMap"&gt;
          &lt;map&gt;
              &lt;entry key="javax.persistence.schema-generation.database.action" value="${jpa.database.action:none}"/&gt;
              &lt;entry key="javax.persistence.schema-generation.scripts.action" value="${jpa.scripts.action:none}"/&gt;
              &lt;entry key="javax.persistence.schema-generation.scripts.drop-target" value="${jpa.scripts.drop-target:target/generated-resources/schemagen/db/drop.ddl}"/&gt;
              &lt;entry key="javax.persistence.schema-generation.scripts.create-target" value="${jpa.scripts.create-target:target/generated-resources/schemagen/db/create.ddl}"/&gt;
              &lt;!-- If present, a ddl script is loaded to init the db. Used only during development. For production a specific script will be provided. 
                   The script is activated on create, drop-and-create, and create-and-drop options for database schema creation --&gt;                    
              &lt;entry key="javax.persistence.sql-load-script-source" value="${jpa.sql-load-script-source:sql/init_db.ddl}"/&gt;
          &lt;/map&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>And the property files used during the test is:</p>
  
  <pre><code>jdbc.driverClassName=org.hsqldb.jdbc.JDBCDriver
  jdbc.url=jdbc:hsqldb:mem:testdb
  jdbc.username=sa
  jdbc.password=
  
  jdbc.showSql=true
  jpa.database.action=drop-and-create
  jpa.scripts.action=drop-and-create
  </code></pre>
  
  <p>Does somebody knows what could be causing this behaviour? </p>