在寫程序時,由於需要用到“分組”類,故隨手寫了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作爲表名導致的衝突。
解決方法:將表名設置爲其它名稱即可。