# Adapt Hibernate ORM 7.4 for GaussDB version 505.2

**URL:** <https://discourse.hibernate.org/t/adapt-hibernate-orm-7-4-for-gaussdb-version-505-2/12378>\
**Category:** Hibernate ORM\
**Created:** [August 5, 2026, 6:33am UTC](https://discourse.hibernate.org/t/adapt-hibernate-orm-7-4-for-gaussdb-version-505-2/12378 "2026-08-05T06:33:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![plafaith\_zhang](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/plafaith_zhang/32/4365_2.png) [@plafaith\_zhang](https://discourse.hibernate.org/u/plafaith_zhang)\
**Post date:** [August 5, 2026, 6:33am UTC](https://discourse.hibernate.org/t/adapt-hibernate-orm-7-4-for-gaussdb-version-505-2/12378/1 "2026-08-05T06:33:10Z")

</div>

PR: [Adapt for GaussDB version 505.2. by plafaithing · Pull Request #13143 · hibernate/hibernate-orm · GitHub](https://github.com/hibernate/hibernate-orm/pull/13143)

Background

Part of adapting Hibernate ORM (fork-7.4) for GaussDB. GaussDB 505.2 exposes two  
compatibility modes via pg\_database.datcompatibility:

- A-mode (Oracle-compatible) — the default
- M-mode / B (MySQL-compatible)

The two modes differ in identifier quoting, type mapping, sequence support,  
generated-key retrieval, and keyword reservation, so a single static dialect cannot  
serve both correctly.

Changes

- hibernate-community-dialects  
\*\* GaussDBDialect now detects the compatibility mode — explicit config  
hibernate.dialect.gaussdb.compatibility\_mode, falling back to probing  
datcompatibility — and applies mode-specific overrides (column types,  
identifier quoting, CHAR/TEXT/CLOB hand.  
\*\* Added JdbcTypes: Array, Boolean, Instant, LocalDate, LocalDateTime,  
OffsetDateTime, TimestampWithTimeZone.  
\*\* Enhanced FunctionRegistry, ExtractFunction, MinMax/JsonObject functions,  
AggregateSupport, SqlAstTranslator, LockingSupport.  
\*\* M-mode dedicated sequence support: GaussDBMModeSequenceInformationExtractor /  
GaussDBMModeSequenceSupport (M mode has no sequence view).

- hibernate-core (tests)  
\*\* Test cases relying on features unsupported under A-mode or M-mode are  
proactively skipped for the corresponding mode. This does not affect the use  
of these test cases with other databases.

- hibernate-testing  
\*\* Adapted PostgreSQLDatabaseCleaner, SharedDriverManagerConnectionProvider,  
DialectFeatureChecks for GaussDB.

- build  
\*\* GaussDB 505.2 version/profile configuration (gradle.properties, local-build-plugins).

Why

To provide support for both A-mode and M-mode in GaussDB, the dialect must branch on  
datcompatibility and override SQL generation accordingly; otherwise Hibernate emits  
SQL valid only in one mode (e.g. double-quote identifiers in M mode, or clob/sequence  
syntax that M mode rejects). Skipping mode-incompatible tests keeps the suite green on  
GaussDB without weakening coverage on other databases.

---

<div class="post-metadata">

**Author:** ![plafaith\_zhang](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/plafaith_zhang/32/4365_2.png) [@plafaith\_zhang](https://discourse.hibernate.org/u/plafaith_zhang)\
**Post date:** [August 12, 2026, 3:53am UTC](https://discourse.hibernate.org/t/adapt-hibernate-orm-7-4-for-gaussdb-version-505-2/12378/3 "2026-08-12T03:53:45Z")

</div>

I would like to merge this code modification into the 7.4 branch, but since I lack the permissions to create JIRA issues (as I am not a member of the Hibernate ORM team), I cannot obtain the key required for the commit message. How can I become a member of the team?

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [August 12, 2026, 1:48pm UTC](https://discourse.hibernate.org/t/adapt-hibernate-orm-7-4-for-gaussdb-version-505-2/12378/4 "2026-08-12T13:48:22Z")

</div>

You don’t have to be a member of the Hibernate ORM team to create a Jira ticket.

Please take a look at the following similar reports:

- [Cannot report bug](https://discourse.hibernate.org/t/cannot-report-bug/11031)
- [Trying to report a bug in Hibernate](https://discourse.hibernate.org/t/trying-to-report-a-bug-in-hibernate/5645)

We heard a couple of times from users that it takes a bit of time until newly created accounts are fully activated, so maybe try again the next day.

---

<div class="post-metadata">

**Author:** ![plafaith\_zhang](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/plafaith_zhang/32/4365_2.png) [@plafaith\_zhang](https://discourse.hibernate.org/u/plafaith_zhang)\
**Post date:** [August 15, 2026, 4:28am UTC](https://discourse.hibernate.org/t/adapt-hibernate-orm-7-4-for-gaussdb-version-505-2/12378/6 "2026-08-15T04:28:30Z")

</div>

Thanks, I have created the JIRA issues and resubmitted the PR; here is the link: [HHH-20785 Adapt for GaussDB version 505.2. by plafaithing · Pull Request #13198 · hibernate/hibernate-orm · GitHub](https://github.com/hibernate/hibernate-orm/pull/13198)
