users@jpa-spec.java.net

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

From: Linda DeMichiel <linda.demichiel_at_oracle.com>
Date: Tue, 11 Dec 2012 09:54:09 -0800

PersistenceProvider has the following method, which subsumes this functionality:

public void generateSchema(PersistenceUnitInfo info, Map map);


We don't need both, do we?



On 12/11/2012 6:59 AM, Gordon Yorke wrote:
> 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