From f4337888b9c45a33abc88dee593f077d83d634c4 Mon Sep 17 00:00:00 2001 From: meteaksoyy Date: Thu, 23 Jul 2026 18:25:21 +0200 Subject: [PATCH] Document class_id_type column in ACL schema appendix The optional acl_class.class_id_type column and the aclClassIdSupported flag on BasicLookupStrategy and JdbcMutableAclService have existed since 5.0 but were not mentioned in the database schema appendix. Closes gh-7598 Signed-off-by: meteaksoyy --- .../servlet/appendix/database-schema.adoc | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/modules/ROOT/pages/servlet/appendix/database-schema.adoc b/docs/modules/ROOT/pages/servlet/appendix/database-schema.adoc index 39c205bb77c..fb34fbe34ba 100644 --- a/docs/modules/ROOT/pages/servlet/appendix/database-schema.adoc +++ b/docs/modules/ROOT/pages/servlet/appendix/database-schema.adoc @@ -370,6 +370,33 @@ BEGIN END; ---- +[[dbschema-acl-class-id-type]] +=== UUID and String Object Identities +By default, the ACL module expects the identifier of a domain object (`object_id_identity`) to be a `Long`. +To use non-Long identifiers, such as `UUID` or `String`, add the optional `class_id_type` column to the `acl_class` table: + +[source,ddl] +---- +create table acl_class( + id bigint generated by default as identity(start with 100) not null primary key, + class varchar_ignorecase(100) not null, + class_id_type varchar_ignorecase(100), + constraint unique_uk_2 unique(class) +); +---- + +The column stores the fully qualified class name of the identifier type, such as `java.util.UUID`. +Since reading and writing this column is disabled by default, you must also enable it on both `BasicLookupStrategy` and `JdbcMutableAclService`: + +[source,java] +---- +basicLookupStrategy.setAclClassIdSupported(true); +jdbcMutableAclService.setAclClassIdSupported(true); +---- + +The ACL artifact JAR contains a complete HyperSQL schema with this column in the `createAclSchemaWithAclClassIdType.sql` file. +For other databases, add the `class_id_type` column to the corresponding `acl_class` definition shown in the preceding sections. + [[dbschema-oauth2-client]] == OAuth 2.0 Client Schema The JDBC implementation of xref:servlet/oauth2/client/core.adoc#oauth2Client-authorized-repo-service[ `OAuth2AuthorizedClientService`] (`JdbcOAuth2AuthorizedClientService`) requires a table for persisting `OAuth2AuthorizedClient` instances.