回答您的附加问题(可以使用哪种仪器查看Hibernate产生了什么以及哪些错误?)
您可以
org.hibernate.tool.hbm2ddl.SchemaExport生成表。
AnnotationConfiguration conf = (new AnnotationConfiguration()).configure();new SchemaExport(conf).create(showHql, run);
第一个参数使您可以查看此命令生成的HQL
CREATE TABLE。第二个是它是否应该实际执行任何修改(即false =空运行)。
因此,与之一起运行
(true, false)将完全向您展示Hibernate对表的处理方式,而无需进行任何更改。



