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
Guard in the Identifier constructor rejecting text that already contains backtick or double-quote markers. Hibernate tracks quoting via the separate 'quoted' flag; the caller passed pre-quoted text instead of using Identifier.quote() or the quoted constructor parameter, so the raw name must be stripped of quote characters.
Solutions
- Remove the backtick/quote characters from the identifier name and set globally_quoted_identifiers or use quotedIdentifier() instead.
- 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.
Defensive patterns
Strategy: validation
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.
Appendix: 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)