hibernate/hibernate-orm · error · IllegalIdentifierException

Identifier text should not contain quote markers (` or ")

Error message

Identifier text should not contain quote markers (` or ")

What it means

Error "Identifier text should not contain quote markers (` or ")" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/boot/model/naming/Identifier.java:222

	 * @param quoted Is this a quoted identifier?
	 */
	public Identifier(String text, boolean quoted) {
		this( text, quoted, false );
	}

	/**
	 * Constructs an identifier instance.
	 *
	 * @param text The identifier text.
	 * @param quoted Is this a quoted identifier?
	 * @param isExplicit Whether the name is explicitly set
	 */
	public Identifier(String text, boolean quoted, boolean isExplicit) {
		if ( isEmpty( text ) ) {
			throw new IllegalIdentifierException( "Identifier text cannot be null" );
		}
		if ( isQuoted( text ) ) {
			throw new IllegalIdentifierException( "Identifier text should not contain quote markers (` or \")" );
		}
		this.text = text;
		this.isQuoted = quoted;
		this.isExplicit = isExplicit;
	}

	/**
	 * Constructs an unquoted identifier instance.
	 *
	 * @param text The identifier text.
	 */
	protected Identifier(String text) {
		this.text = text;
		this.isQuoted = false;
		this.isExplicit = false;
	}

	/**

View on GitHub (pinned to fad1729dce)

Solutions

  1. Remove the backtick/quote characters from the identifier name and set globally_quoted_identifiers or use quotedIdentifier() instead.
  2. Use Identifier.toIdentifier(text, true) rather than embedding quote markers in the raw name.

Example fix

Remove the backtick/quote characters from the identifier name and set globally_quoted_identifiers or use quotedIdentifier() instead.

When it happens

Trigger: An entity mapping annotation or bootstrap configuration violates a Hibernate mapping rule.

Common situations: Annotation mapping mistakes: inverse-side @Id associations, @Column on @OneToOne, unmapped association targets, mismatched @EnumeratedValue/@Temporal usage, duplicate sequence generators.


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