在写程序时,由于需要用到“分组”类,故随手写了Group作为类名(坑!)。
在之后使用Hibernate自动建表时,报错:
Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [create table Group (id integer not null, name varchar(255), primary key (id))]
这就是由于使用了关键字Group作为表名导致的冲突。
解决方法:将表名设置为其它名称即可。