Does OceanBase Database conflict with JPA?
13:13 26 May 2026

We are currently evaluating a migration of our enterprise Java application from a standard MySQL instance to OceanBase to leverage its distributed capabilities. Our backend stack is heavily reliant on Spring Boot 3.x and Spring Data JPA (with Hibernate as the core provider).

Since OceanBase offers a MySQL-compatible mode, I initially assumed it would work completely out-of-the-box using standard Hibernate dialects like `org.hibernate.dialect.MySQL8Dialect`. However, some team members are raising concerns about potential under-the-hood conflicts.

Specifically, we are worried about:

1. Schema auto-generation (`ddl-auto: update`) and how it handles OceanBase's distributed partitioning.

2. Entity ID generation strategies (like `GenerationType.IDENTITY` vs sequences) in a distributed environment.

3. Complex locking behaviors (e.g., `LockModeType.PESSIMISTIC_WRITE` translating to `SELECT ... FOR UPDATE`).

Has anyone successfully deployed a large-scale JPA application on top of OceanBase? Are there any known compatibility issues, performance bottlenecks, or specific custom dialects we need to configure to avoid unexpected SQL syntax errors?

Any insights or production experiences would be highly appreciated. Thanks!

oceanbase