users@jpa-spec.java.net

[jpa-spec users] [jsr338-experts] Schema generation APIs

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Tue, 11 Dec 2012 10:59:37 -0400

After some review it seems to me that PersistenceProvider is missing the
following method:

     /**
      * Create database schemas and/or tables and/or create DDL
      * scripts as determined by the supplied properties.
      * <p>
      * Called by the Persistence class when schema generation is to
      * occur as a separate phase from creation of the entity
      * manager factory.
      * <p>
      * @param persistenceUnitName the name of the persistence unit
      * @param map properties for schema generation; these may
      * also contain provider-specific properties. The
      * value of these properties override any values that
      * may have been configured elsewhere..
      * @throws PersistenceException if insufficient or inconsistent
      * configuration information is provided of if schema
      * generation otherwise fails
      *
      * @since Java Persistence 2.1
      */
     public void generateSchema(String persistenceUnitName, Map map);

as currently there is no support for the
Persistence.generateSchema(String, Map) method.

--Gordon