Introduction
Changelog
Contact
Guides
Getting Started
Entities
Repositories
Queries & Specifications
Configuration & Pooling
Migrations
Spring Boot
Spigot & Paper Plugins
Recipes
Reference
Databases
Troubleshooting
Advanced
Multi-tenancy
Audit Trail
Testing
TrademarkTrademark
Ctrl k
Search…
Get started
Introduction
Changelog
Contact
Guides
Getting Started
Entities
Repositories
Queries & Specifications
Configuration & Pooling
Migrations
Spring Boot
Spigot & Paper Plugins
Recipes
Reference
Databases
Troubleshooting
Advanced
Multi-tenancy
Audit Trail
Testing
TrademarkTrademark© Aveiro. All rights reserved.
Built with Aveiro
Reference

Databases

Supported databases, their drivers and property prefixes, and notes on dialect auto-detection and UUID column types.
Updated last month
Troubleshooting
JEHibernate selects the driver and dialect from the DatabaseType you choose; you only add the JDBC driver to the classpath. The dialect is auto-detected from the live connection — you never set hibernate.dialect by hand.

Supported databases

`DatabaseType`
Prefix
Default driver
H2h2org.h2.Driver
MYSQLmysqlcom.mysql.cj.jdbc.Driver
MARIADBmariadborg.mariadb.jdbc.Driver
POSTGRESQL
postgresql
org.postgresql.Driver
MSSQL_SERVER
mssql
com.microsoft.sqlserver.jdbc.SQLServerDriver
ORACLE
oracle
oracle.jdbc.OracleDriver
SQLITE
sqlite
org.sqlite.JDBC
HSQLDB
hsqldb
org.hsqldb.jdbc.JDBCDriver
H2, MySQL, MariaDB, and PostgreSQL are covered by the integration test suite; the others use the same code path.

Adding a driver

The driver is the host's choice — add exactly the one you deploy against.

Aligning versions with the BOM

Import jehibernate-bom once and drop the per-module versions, so jehibernate-core, -spring-boot, -plugin, and -testing always match.

Connection URLs

Dialect is auto-detected

You do not set a dialect. JEHibernate lets Hibernate resolve it from the JDBC connection, which is the correct and portable choice. If you ever need to force one (an exotic variant), {prefix}.dialect or config.dialect(...) still works.

UUID columns

UuidEntity ids map to the native UUID type per database: uuid on PostgreSQL and H2, binary(16) on MySQL/MariaDB, uniqueidentifier on SQL Server. You do not hard-code a column definition, and UUID entities work on PostgreSQL without extra setup.
Switching databases
With a properties file, an admin changes database.type and fills in the matching prefix block — no recompile. The dialect follows the connection automatically.
runtimeOnly("com.h2database:h2:2.5.252")            // embedded
runtimeOnly("org.postgresql:postgresql:42.7.14")
runtimeOnly("com.mysql:mysql-connector-j:9.3.0")
runtimeOnly("org.mariadb.jdbc:mariadb-java-client:3.5.10")
implementation(platform("de.jexcellence.hibernate:jehibernate-bom:4.2.0"))
implementation("de.jexcellence.hibernate:jehibernate-core")        // version comes from the BOM
h2.url=jdbc:h2:file:./plugins/MyPlugin/database/mydb;MODE=MySQL;AUTO_SERVER=TRUE
mysql.url=jdbc:mysql://localhost:3306/mydb?useSSL=false&serverTimezone=UTC&characterEncoding=UTF-8
postgresql.url=jdbc:postgresql://localhost:5432/mydb
mariadb.url=jdbc:mariadb://localhost:3306/mydb?useSSL=false