我正在通过Hibernate(注释)使用Postgres,但它似乎在处理User对象时失败了:
12:09:16,442 ERROR [SchemaExport] Unsuccessful: create table User (id bigserial not null, password varchar(255), username varchar(255), primary key (id))
12:09:16,442 ERROR [SchemaExport] ERROR: syntax error at or near "User"
Run Code Online (Sandbox Code Playgroud)
如果我手动运行SQL,我必须在表名周围加上引号,因为用户似乎是一个postgres关键字,但我怎么能说服hibernate自己做呢?
提前致谢.