Unknown entity: org.hibernate.internal.CriteriaImpl; nested exception is org.hibernate.MappingException: Unknown entity: org.hibernate.internal.CriteriaImpl

一开始以为时没找到映射文件,后来发现是Dao写的有问题

getHibernateTemplate().delete()参数是一个pojo的实例,我传入的对象不对导致出现了问题

Unknown entity: org.hibernate.internal.CriteriaImpl; nested exception is org.hibernate.MappingException: Unknown entity: org.hibernate.internal.CriteriaImpl

最后改成如下,在delete()里传入实例

Unknown entity: org.hibernate.internal.CriteriaImpl; nested exception is org.hibernate.MappingException: Unknown entity: org.hibernate.internal.CriteriaImpl

Unknown entity: org.hibernate.internal.CriteriaImpl; nested exception is org.hibernate.MappingException: Unknown entity: org.hibernate.internal.CriteriaImpl

上一篇:Unity与Android通信的中间件


下一篇:设计模式 - 迭代器模式(iterator pattern) Java 迭代器(Iterator) 详解