Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

promote schema-export-specific config properties #657

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

// Contributors:
// Gavin King - 4.0
// Gavin King - 3.2
package jakarta.persistence;

Expand Down Expand Up @@ -162,7 +163,28 @@ public class PersistenceConfiguration {
public static final String SCHEMAGEN_DROP_TARGET = "jakarta.persistence.schema-generation.drop-target";

/**
* An instance of {@code jakarta.validation.ValidatorFactory},
* The value returned by {@link java.sql.DatabaseMetaData#getDatabaseProductName()},
* for use when JDBC metadata is not available.
* @since 4.0
*/
public static final String DATABASE_PRODUCT_NAME = "jakarta.persistence.database-product-name";

/**
* The value returned by {@link java.sql.DatabaseMetaData#getDatabaseMajorVersion()},
* for use when JDBC metadata is not available.
* @since 4.0
*/
public static final String DATABASE_MAJOR_VERSION = "jakarta.persistence.database-major-version";

/**
* The value returned by {@link java.sql.DatabaseMetaData#getDatabaseMinorVersion()},
* for use when JDBC metadata is not available.
* @since 4.0
*/
public static final String DATABASE_MINOR_VERSION = "jakarta.persistence.database-minor-version";

/**
* An instance of {@code jakarta.validation.ValidatorFactory}.
*/
public static final String VALIDATION_FACTORY = "jakarta.persistence.validation.factory";
/**
Expand Down
12 changes: 12 additions & 0 deletions spec/src/main/asciidoc/ch09-container-provider-contracts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,18 @@ for the configuration of the entity manager factory:
persistence unit.
| `jakarta.persistence.validation.factory`
| Instance of `jakarta.validation.ValidatorFactory`.
| `jakarta.persistence.database-product-name`
| The value returned for the target database by the JDBC method
`getDatabaseProductName` of `DatabaseMetaData`, for use in
situations where JDBC metadata is not available.
| `jakarta.persistence.database-major-version`
| The value returned for the target database by the JDBC method
`getDatabaseMajorVersion` of `DatabaseMetaData`, for use in
situations where JDBC metadata is not available.
| `jakarta.persistence.database-minor-version`
| The value returned for the target database by the JDBC method
`getDatabaseMinorVersion` of `DatabaseMetaData`, for use in
situations where JDBC metadata is not available.
|===

Any number of vendor-specific properties may
Expand Down