![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ssh
面具人生lql
这个作者很懒,什么都没留下…
展开
-
@ManyToOne references an unknown entity:
报错:@OneToOne or @ManyToOne on com.it.shop.model.Product.category references an unknown entity: com.it.shop.model.Category1.检查hibernate.cfg.xml中是否做了mappingmappingclass="com.it.shop.原创 2016-11-04 13:20:55 · 7287 阅读 · 0 评论 -
object references an unsaved transient instance
报错:object references an unsaved transient instance - save the transient instance before flushing: com.it.shop.model.Publishers解决:设置ManyToOne,OneToMany两边的Cascade策略一致@ManyToOne(fetch = FetchTy原创 2016-11-04 13:23:58 · 543 阅读 · 0 评论 -
sessionfactory.getcurrentsession()获取不到session
1,如果使用hibernate配置 在hibernate.cfg.xml里配置 thread 如果使用的是getCurrentSession()的话,需要配置,否则是空指针。 使用openSession()不需要配置2,如果使用Spring注入 检查sessionFactory配置是否正确 如果sessionFa原创 2016-11-04 13:25:02 · 5511 阅读 · 0 评论 -
解决: org.springframework.beans.factory.BeanNotOfRequiredTypeException
错误信息: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'aisleService' must be of type [com.gdie.whlocation.service.impl.AisleService], but was actually of type [$P转载 2016-11-04 13:27:25 · 31757 阅读 · 5 评论 -
BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type [com.sun.p
org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'applicationService' must be of type [com.meta.dbcenter.application.service.impl.ApplicationServiceImpl], but was actually原创 2016-11-04 13:30:23 · 5221 阅读 · 0 评论