From e1b1272ca831632bb20a3f33aca2a1d432eab9ba Mon Sep 17 00:00:00 2001 From: Gavin King Date: Sun, 18 May 2025 17:03:52 +0200 Subject: [PATCH] add more links to Short Guide --- .../main/asciidoc/introduction/Advanced.adoc | 22 +++++++++---------- .../main/asciidoc/introduction/Mapping.adoc | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/documentation/src/main/asciidoc/introduction/Advanced.adoc b/documentation/src/main/asciidoc/introduction/Advanced.adoc index 1b70d14f8a2f..22aaa74b32fe 100644 --- a/documentation/src/main/asciidoc/introduction/Advanced.adoc +++ b/documentation/src/main/asciidoc/introduction/Advanced.adoc @@ -316,8 +316,8 @@ To make use of multi-tenancy, we'll usually need to set at least one of these co |=== | Configuration property name | Purpose -| `hibernate.tenant_identifier_resolver` | Specifies the `CurrentTenantIdentifierResolver` -| `hibernate.multi_tenant_connection_provider` | Specifies the `MultiTenantConnectionProvider` +| link:{doc-javadoc-url}org/hibernate/cfg/MultiTenancySettings.html#MULTI_TENANT_IDENTIFIER_RESOLVER[`hibernate.tenant_identifier_resolver`] | Specifies the `CurrentTenantIdentifierResolver` +| link:{doc-javadoc-url}org/hibernate/cfg/MultiTenancySettings.html#MULTI_TENANT_CONNECTION_PROVIDER[`hibernate.multi_tenant_connection_provider`] | Specifies the `MultiTenantConnectionProvider` |=== Do not configure those properties if you would like the configured `BeanContainer` provide the implementation. @@ -467,7 +467,7 @@ Furthermore, the link:{doc-javadoc-url}org/hibernate/annotations/ValueGeneration // .The older APIs are still available in Hibernate 6 ==== These APIs were new in Hibernate 6, and supersede the classic `IdentifierGenerator` interface and `@GenericGenerator` annotation from older versions of Hibernate. -However, the older APIs are still available and custom ``IdentifierGenerator``s written for older versions of Hibernate continue to work in Hibernate 6. +However, the older APIs are still available and custom ``IdentifierGenerator``s written for older versions of Hibernate continue to work in Hibernate 7. ==== Hibernate has a range of built-in generators which are defined in terms of this new framework. @@ -477,12 +477,12 @@ Hibernate has a range of built-in generators which are defined in terms of this |=== | Annotation | Implementation | Purpose -| `@Generated` | `GeneratedGeneration` | Generically handles database-generated values -| `@GeneratedColumn` | `GeneratedAlwaysGeneration` | Handles values generated using `generated always` -| `@CurrentTimestamp` | `CurrentTimestampGeneration` | Generic support for database or in-memory generation of creation or update timestamps -| `@CreationTimestamp` | `CurrentTimestampGeneration` | A timestamp generated when an entity is first made persistent -| `@UpdateTimestamp` | `CurrentTimestampGeneration` | A timestamp generated when an entity is made persistent, and regenerated every time the entity is modified -| `@UuidGenerator` | `UuidGenerator` | A more flexible generator for RFC 4122 UUIDs +| link:{doc-javadoc-url}org/hibernate/annotations/Generated.html[`@Generated`] | `GeneratedGeneration` | Generically handles database-generated values +| link:{doc-javadoc-url}org/hibernate/annotations/GeneratedColumn.html[`@GeneratedColumn`] | `GeneratedAlwaysGeneration` | Handles values generated using `generated always` +| link:{doc-javadoc-url}org/hibernate/annotations/CurrentTimestamp.html[`@CurrentTimestamp`] | `CurrentTimestampGeneration` | Generic support for database or in-memory generation of creation or update timestamps +| link:{doc-javadoc-url}org/hibernate/annotations/CreationTimestamp.html[`@CreationTimestamp`] | `CurrentTimestampGeneration` | A timestamp generated when an entity is first made persistent +| link:{doc-javadoc-url}org/hibernate/annotations/UpdateTimestamp.html[`@UpdateTimestamp`] | `CurrentTimestampGeneration` | A timestamp generated when an entity is made persistent, and regenerated every time the entity is modified +| link:{doc-javadoc-url}org/hibernate/annotations/UuidGenerator.html[`@UuidGenerator`] | `UuidGenerator` | A more flexible generator for RFC 4122 UUIDs |=== Furthermore, support for JPA's standard id generation strategies is also defined in terms of this framework. @@ -595,8 +595,8 @@ Custom naming strategies may be enabled using the configuration properties we al |=== | Configuration property name | Purpose -| `hibernate.implicit_naming_strategy` | Specifies the `ImplicitNamingStrategy` -| `hibernate.physical_naming_strategy` | Specifies the `PhysicalNamingStrategy` +| link:{doc-javadoc-url}org/hibernate/cfg/MappingSettings.html#IMPLICIT_NAMING_STRATEGY[`hibernate.implicit_naming_strategy`] | Specifies the `ImplicitNamingStrategy` +| link:{doc-javadoc-url}org/hibernate/cfg/MappingSettings.html#PHYSICAL_NAMING_STRATEGY[`hibernate.physical_naming_strategy`] | Specifies the `PhysicalNamingStrategy` |=== [[spatial]] diff --git a/documentation/src/main/asciidoc/introduction/Mapping.adoc b/documentation/src/main/asciidoc/introduction/Mapping.adoc index cad2cc0c61d4..c638dd0e049b 100644 --- a/documentation/src/main/asciidoc/introduction/Mapping.adoc +++ b/documentation/src/main/asciidoc/introduction/Mapping.adoc @@ -470,6 +470,7 @@ Note that the `foreignKey` member is completely optional and only affects DDL ge If you don't supply an explicit name using `@ForeignKey`, Hibernate will generate a quite ugly name. The reason for this is that the maximum length of foreign key names on some databases is extremely constrained, and we need to avoid collisions. To be fair, this is perfectly fine if you're only using the generated DDL for testing. +You can customize the generated constraint names by writing your own <>. ==== For composite foreign keys we might have multiple `@JoinColumn` annotations: