问题:
Exception in thread "main" org.hibernate.MappingException: An association from the table crm_liushi refers to an unmapped class: com.crm.entity.person
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1299)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1217)
at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:803)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:128)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)
at com.crm.util.ExportDB.main(ExportDB.java:9)
答案:
实体类的映射文件里的多对一时,把里面的实体类的名称写错了
Exception in thread "main" org.hibernate.MappingException: An association from the table crm_liushi refers to an unmapped class: com.crm.entity.person
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1299)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1217)
at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:803)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:128)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)
at com.crm.util.ExportDB.main(ExportDB.java:9)
答案:
实体类的映射文件里的多对一时,把里面的实体类的名称写错了