hibernate/hibernate-orm · error · UnsupportedOperationException

this dialect does not support query pagination

Error message

this dialect does not support query pagination

What it means

Error "this dialect does not support query pagination" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java:2286

	 * Does this database support primary keys for temporary tables?
	 *
	 * @return true by default, since most do
	 * @deprecated Moved to {@link TemporaryTableStrategy#supportsTemporaryTablePrimaryKey()}
	 */
	@Deprecated(forRemoval = true, since = "7.1")
	public boolean supportsTemporaryTablePrimaryKey() {
		// Most databases do
		return true;
	}

	// limit/offset support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	/**
	 * Obtain a {@link LimitHandler} that implements pagination support for
	 * {@link Query#setMaxResults(int)} and {@link Query#setFirstResult(int)}.
	 */
	public LimitHandler getLimitHandler() {
		throw new UnsupportedOperationException("this dialect does not support query pagination");
	}


	// lock acquisition support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	/**
	 * Access to various details and operations related to this
	 * Dialect's support for pessimistic locking.
	 */
	public LockingSupport getLockingSupport() {
		return LockingSupportSimple.STANDARD_SUPPORT;
	}


	/**
	 * Whether this dialect supports {@code for update (of)}
	 *
	 * @deprecated See notes on {@linkplain LockingSupport.Metadata#supportsForUpdate()}

View on GitHub (pinned to fad1729dce)

Solutions

  1. Remove pagination calls or switch to a dialect that supports LIMIT/OFFSET.
  2. Implement a custom dialect overriding getLimitHandler.

When it happens

Trigger: Triggered when the application calls a Hibernate dialect feature that the configured database dialect cannot provide: this dialect does not support query pagination.

Common situations: Common when running against a database whose dialect lacks this capability, when a mapping or HQL/Criteria query requests unsupported functionality, or when the wrong dialect is configured for the database in use. Error: this dialect does not support query pagination.


AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22). Data as JSON: /api/errors/6f8d472890296a9e. Report an issue: GitHub.