From ccff90b211249373b9190250c7ed960ce244d4e9 Mon Sep 17 00:00:00 2001
From: Gavin
+ * Note that Hibernate does not distinguish between JPA-defined configuration
+ * properties and "native" configuration properties. Any property listed here
+ * may be used to configure Hibernate no matter what configuration mechanism
+ * or bootstrap API is used.
*
* @author Steve Ebersole
*/
diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/package-info.java b/hibernate-core/src/main/java/org/hibernate/cfg/package-info.java
index 44d72c9495..57d2815ecb 100644
--- a/hibernate-core/src/main/java/org/hibernate/cfg/package-info.java
+++ b/hibernate-core/src/main/java/org/hibernate/cfg/package-info.java
@@ -17,5 +17,114 @@
*
* Note that all the real meat behind these APIs is defined in the package
* {@link org.hibernate.boot}.
+ *
+ * Configuration properties may be specified:
+ *
+ * We now present a couple of example configuration files.
+ *
+ *
- * sessionFactory.inTransaction(session -> {
+ * sessionFactory.inTransaction(session -> {
* //do the work
* ...
* });
@@ -127,7 +127,7 @@ import jakarta.persistence.criteria.CriteriaUpdate;
* A session may be used to {@linkplain #doWork(Work) execute JDBC work} using its JDBC
* connection and transaction:
*
- * session.doWork(connection -> {
+ * session.doWork(connection -> {
* try ( PreparedStatement ps = connection.prepareStatement( " ... " ) ) {
* ps.execute();
* }
diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java
index ff8298c1d0..379da34a28 100644
--- a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java
+++ b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java
@@ -44,6 +44,11 @@ import jakarta.persistence.criteria.CriteriaUpdate;
*
+ *
+ * Example JPA configuration file
+ *
+ * The following JPA configuration may be specified in a file named {@code persistence.xml}:
+ *
+ * {@code
+ *
+ * The JPA configuration file is necessary when bootstrapping Hibernate via
+ * {@link jakarta.persistence.Persistence#createEntityManagerFactory(java.lang.String)}.
+ *
+ * Example native configuration file
+ *
+ * The following configuration may be specified in a file named {@code hibernate.cfg.xml}:
+ *
+ * {@code
+ *
+ *
+ *
+ *
+ * The native configuration file is used when configuring Hibernate via
+ * {@link org.hibernate.cfg.Configuration#configure()} or
+ * {@link org.hibernate.boot.registry.StandardServiceRegistryBuilder#configure()}.
*/
package org.hibernate.cfg;
diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java
index be7fb06e4f..25d462bcbc 100644
--- a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java
+++ b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java
@@ -2145,8 +2145,6 @@ public abstract class Dialect implements ConversionContext, TypeContributor, Fun
* @param lockOptions The lock options to apply
* @param tableName The name of the table to which to apply the lock hint.
* @return The table with any required lock hints.
- *
- * @author Helge Schulz
*/
public String appendLockHint(LockOptions lockOptions, String tableName){
return tableName;
diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmFrom.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmFrom.java
index 495fd2b776..06869348a4 100644
--- a/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmFrom.java
+++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/tree/domain/AbstractSqmFrom.java
@@ -104,7 +104,7 @@ public abstract class AbstractSqmFrom
- A comprehensive list of configuration properties understood by Hibernate may be found in the - class {@link org.hibernate.cfg.AvailableSettings}. Most sensible programs will only ever need + Example configuration files for JPA and native usage may be found {@linkplain org.hibernate.cfg + here}. A comprehensive list of configuration properties understood by Hibernate may be found in + the class {@link org.hibernate.cfg.AvailableSettings}. Most sensible programs will only ever need to use a tiny handful of them.
diff --git a/release/src/release/javadoc/overview.html b/release/src/release/javadoc/overview.html index e3f7a16e5e..eb6ed96692 100644 --- a/release/src/release/javadoc/overview.html +++ b/release/src/release/javadoc/overview.html @@ -126,8 +126,9 @@ mappings as an alternative. container-managed transactions.- A comprehensive list of configuration properties understood by Hibernate may be found in the - class {@link org.hibernate.cfg.AvailableSettings}. Most sensible programs will only ever need + Example configuration files for JPA and native usage may be found {@linkplain org.hibernate.cfg + here}. A comprehensive list of configuration properties understood by Hibernate may be found in + the class {@link org.hibernate.cfg.AvailableSettings}. Most sensible programs will only ever need to use a tiny handful of them.