Skip to content

Commit

Permalink
promote schema-export-specific config properties
Browse files Browse the repository at this point in the history
see issue jakartaee#628

Signed-off-by: Gavin King <[email protected]>
  • Loading branch information
gavinking committed Sep 20, 2024
1 parent 24bf062 commit 11e9a2c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
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

0 comments on commit 11e9a2c

Please sign in to comment.