如何使用 Liquibase Hibernate 插件配置主键名称的长度

rin*_*nce 5 java hibernate liquibase

我正在使用 Liquibase Hibernate 插件生成从实体类到数据库的 diffChangeLog。

我遇到的一个问题是 Liquibase 为主键生成的名称太短。

例如我有2张桌子,

unsub_template 和 unsub_template_item

生成的变更集分别是

<changeSet author="rince(generated)" id="1405359138759-50">
        <createTable tableName="unsub_template">
            <column autoIncrement="true" name="id" type="BIGINT">
                <constraints primaryKey="true" primaryKeyName="unsub_templatPK"/>
            </column>
Run Code Online (Sandbox Code Playgroud)

<changeSet author="rince(generated)" id="1405359138759-51">
        <createTable tableName="unsub_template_item">
            <column autoIncrement="true" name="id" type="BIGINT">
                <constraints primaryKey="true" primaryKeyName="unsub_templatPK"/>
            </column>
Run Code Online (Sandbox Code Playgroud)

请注意,primaryKeyName 属性均为 unsub_templatPK,长度均为 15 个字符

我做了一些调试,发现了长度为 的原因org.hibernate.mapping.PersistentClassPK_ALIAS那里定义了一个静态字段

private static final Alias PK_ALIAS = new Alias(15, "PK");
Run Code Online (Sandbox Code Playgroud)

有什么办法可以配置 PK_ALIAS 吗?