hibernate/hibernate-orm · error · AnnotationException
Entity name '${entityName}' for ${className} is quoted; quot
Error message
Entity name '${entityName}' for ${className} is quoted; quoted database identifiers must be declared using table and column annotations What it means
Error "Entity name '${entityName}' for ${className} is quoted; quoted database identifiers must be declared using table and column annotations" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/model/internal/EntityBinder.java:1408
throw new AnnotationException( "Entity '" + name + "' is annotated both '@DynamicUpdate' and '@SQLUpdate'" );
}
}
private void bindOptimisticLocking() {
final var optimisticLocking = annotatedClass.getAnnotationUsage( OptimisticLocking.class, modelsContext() );
persistentClass.setOptimisticLockStyle( fromLockType( optimisticLocking == null
? OptimisticLockType.VERSION
: optimisticLocking.type() ) );
}
private void bindEntityAnnotation() {
final var entity = annotatedClass.getAnnotationUsage( Entity.class, modelsContext() );
if ( entity == null ) {
throw new AssertionFailure( "@Entity should never be missing" );
}
final String entityName = entity.name();
if ( StringHelper.isQuoted( entityName ) ) {
throw new AnnotationException(
"Entity name '" + entityName + "' for " + annotatedClass.getName()
+ " is quoted; quoted database identifiers must be declared using table and column annotations"
);
}
name = entityName.isBlank() ? unqualify( annotatedClass.getName() ) : entityName;
}
public boolean isRootEntity() {
// This is the best option I can think of here since
// PersistentClass is most likely not yet fully populated
return persistentClass instanceof RootClass;
}
private void bindEntity() {
bindEntityAnnotation();
bindRowManagement();
bindOptimisticLocking();
bindConcreteProxy();View on GitHub (pinned to fad1729dce)
Solutions
- Remove quoting from the entity name; declare quoted identifiers via table and column annotations instead.
When it happens
Trigger: An identifier mapping rule is violated (missing, misplaced, or redeclared @Id).
Common situations: Entities without any @Id, id redefinition in subclasses, @Id inside an @IdClass entity or embeddable, or @GeneratedValue on a non-identifier property.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/76df58f118d58c64.
Report an issue: GitHub.